Skip to content

Commit

Permalink
Put docker hub and ghcr.io in one action
Browse files Browse the repository at this point in the history
  • Loading branch information
wbonis committed Aug 29, 2024
1 parent fe09db7 commit c17707a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 33 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
# vscode-github-actions: ignore
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
- name: Build and push to Docker Hub
uses: docker/build-push-action@v4
with:
push: true
tags: styliteag/ssh-key-manager:latest
- name: Build and push to GitHub Container Registry
uses: docker/build-push-action@v4
with:
push: true
tags: styliteag/ssh-key-manager:latest
tags: ghcr.io/${{ github.repository }}/ssh-key-manager:latest
31 changes: 0 additions & 31 deletions .github/workflows/github-publish.ymll

This file was deleted.

0 comments on commit c17707a

Please sign in to comment.