Skip to content

Commit

Permalink
use ghcr
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jun 14, 2021
1 parent f14a179 commit de2e460
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,17 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get git tag
run: |
echo "::set-output name=GIT_TAG::$(git tag --points-at HEAD)"
id: set_git_vars
- name: Build and push
- name: Push to Docker Hub
uses: docker/build-push-action@v2
with:
context: .
Expand All @@ -113,6 +119,15 @@ jobs:
tags: ${{ github.repository }}:${{ steps.set_git_vars.outputs.GIT_TAG }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Push to GitHub Packages
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: ghcr.io/${{ github.repository }}:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache

deploy:
needs: [test, build]
Expand Down

0 comments on commit de2e460

Please sign in to comment.