Skip to content

Commit b955941

Browse files
committed
Update CI/CD to push Docker images to GitHub Container Registry
- Replace Docker Hub with GitHub Container Registry (ghcr.io) - Use GitHub token authentication instead of separate Docker credentials - Add packages:write permission for GHCR access - Images will now be available at ghcr.io/rossigee/bucketsyncd
1 parent ad3db24 commit b955941

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ permissions:
1212
contents: write
1313
security-events: write
1414
actions: read
15+
packages: write
1516

1617
env:
1718
GO_VERSION: '1.25.0'
@@ -203,19 +204,19 @@ jobs:
203204
- name: Set up Docker Buildx
204205
uses: docker/setup-buildx-action@v3
205206

206-
- name: Log in to Docker Hub
207+
- name: Log in to GitHub Container Registry
207208
if: github.event_name == 'release'
208209
uses: docker/login-action@v3
209-
continue-on-error: true
210210
with:
211-
username: ${{ secrets.DOCKER_USERNAME }}
212-
password: ${{ secrets.DOCKER_PASSWORD }}
211+
registry: ghcr.io
212+
username: ${{ github.actor }}
213+
password: ${{ secrets.GITHUB_TOKEN }}
213214

214215
- name: Extract metadata
215216
id: meta
216217
uses: docker/metadata-action@v5
217218
with:
218-
images: ${{ github.repository }}
219+
images: ghcr.io/${{ github.repository }}
219220
tags: |
220221
type=ref,event=branch
221222
type=ref,event=pr

0 commit comments

Comments
 (0)