Skip to content

Commit

Permalink
push to ghcr instead of dockerhub
Browse files Browse the repository at this point in the history
  • Loading branch information
flyerhzm committed May 21, 2024
1 parent 5ab9993 commit 62f6268
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ jobs:
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v2
with:
push: true
tags: ${{ github.repository }}:${{ steps.sha.outputs.sha7 }}
tags: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ steps.sha.outputs.sha7 }}

0 comments on commit 62f6268

Please sign in to comment.