Skip to content

Commit

Permalink
ci: publish also to ghcr.io
Browse files Browse the repository at this point in the history
  • Loading branch information
davidecavestro committed Jun 13, 2024
1 parent 3105d3a commit 09ba951
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract version number
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
Expand All @@ -44,6 +51,8 @@ jobs:
tags: |
davidecavestro/gphotos-cdp:dev-main
davidecavestro/gphotos-cdp:${{ github.sha }}
ghcr.io/davidecavestro/gphotos-cdp:dev-main
ghcr.io/davidecavestro/gphotos-cdp:${{ github.sha }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
if: github.ref == 'refs/heads/main'
Expand All @@ -56,6 +65,8 @@ jobs:
tags: |
davidecavestro/gphotos-cdp:${{ env.VERSION }}
davidecavestro/gphotos-cdp:latest
ghcr.io/davidecavestro/gphotos-cdp:${{ env.VERSION }}
ghcr.io/davidecavestro/gphotos-cdp:latest
if: startsWith(github.ref, 'refs/tags/')

create-release:
Expand Down Expand Up @@ -85,7 +96,7 @@ jobs:
release_name: v${{ github.ref_name }}
body: |
This release provides the container image:
`ghcr.io/davidecavestro/gphotos-cdp:${{ github.ref_name }}`
`davidecavestro/gphotos-cdp:${{ github.ref_name }}`
${{ steps.changelog.outputs.changes }}
draft: false
prerelease: false
Expand Down

0 comments on commit 09ba951

Please sign in to comment.