Skip to content

Commit 09ba951

Browse files
ci: publish also to ghcr.io
1 parent 3105d3a commit 09ba951

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/docker-image.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ jobs:
2323
username: ${{ secrets.DOCKER_USERNAME }}
2424
password: ${{ secrets.DOCKER_PASSWORD }}
2525

26+
- name: Log in to the Container registry
27+
uses: docker/login-action@v2
28+
with:
29+
registry: ghcr.io
30+
username: ${{ github.actor }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
32+
2633
- name: Extract version number
2734
id: get_version
2835
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
@@ -44,6 +51,8 @@ jobs:
4451
tags: |
4552
davidecavestro/gphotos-cdp:dev-main
4653
davidecavestro/gphotos-cdp:${{ github.sha }}
54+
ghcr.io/davidecavestro/gphotos-cdp:dev-main
55+
ghcr.io/davidecavestro/gphotos-cdp:${{ github.sha }}
4756
cache-from: type=local,src=/tmp/.buildx-cache
4857
cache-to: type=local,dest=/tmp/.buildx-cache
4958
if: github.ref == 'refs/heads/main'
@@ -56,6 +65,8 @@ jobs:
5665
tags: |
5766
davidecavestro/gphotos-cdp:${{ env.VERSION }}
5867
davidecavestro/gphotos-cdp:latest
68+
ghcr.io/davidecavestro/gphotos-cdp:${{ env.VERSION }}
69+
ghcr.io/davidecavestro/gphotos-cdp:latest
5970
if: startsWith(github.ref, 'refs/tags/')
6071

6172
create-release:
@@ -85,7 +96,7 @@ jobs:
8596
release_name: v${{ github.ref_name }}
8697
body: |
8798
This release provides the container image:
88-
`ghcr.io/davidecavestro/gphotos-cdp:${{ github.ref_name }}`
99+
`davidecavestro/gphotos-cdp:${{ github.ref_name }}`
89100
${{ steps.changelog.outputs.changes }}
90101
draft: false
91102
prerelease: false

0 commit comments

Comments
 (0)