Skip to content

Commit 9fd4396

Browse files
committed
Update workflow to publish to Docker Hub instead of GHCR
1 parent c67b9b3 commit 9fd4396

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

.github/workflows/publish-image.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ permissions:
1515
id-token: write
1616

1717
env:
18-
REGISTRY: ghcr.io
1918
IMAGE_NAME: spintheweb/webspinner
2019

2120
jobs:
@@ -39,18 +38,17 @@ jobs:
3938
- name: Set up Docker Buildx
4039
uses: docker/setup-buildx-action@v3
4140

42-
- name: Log in to GHCR
41+
- name: Log in to Docker Hub
4342
uses: docker/login-action@v3
4443
with:
45-
registry: ghcr.io
46-
username: ${{ github.actor }}
47-
password: ${{ secrets.GITHUB_TOKEN }}
44+
username: ${{ secrets.DOCKERHUB_USERNAME }}
45+
password: ${{ secrets.DOCKERHUB_TOKEN }}
4846

4947
- name: Docker metadata
5048
id: meta
5149
uses: docker/metadata-action@v5
5250
with:
53-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
51+
images: ${{ env.IMAGE_NAME }}
5452
tags: |
5553
type=semver,pattern=v{{major}}.{{minor}}.{{patch}}
5654
type=ref,event=branch
@@ -81,7 +79,7 @@ jobs:
8179
- name: Generate artifact attestation
8280
uses: actions/attest-build-provenance@v1
8381
with:
84-
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
82+
subject-name: ${{ env.IMAGE_NAME }}
8583
subject-digest: ${{ steps.build-and-push-image.outputs.digest }}
8684
push-to-registry: true
8785

@@ -91,4 +89,4 @@ jobs:
9189
steps:
9290
- name: Image summary
9391
run: |
94-
echo "Image pushed: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ needs.build-and-push.outputs.image-ref }}"
92+
echo "Image pushed: ${{ env.IMAGE_NAME }}@${{ needs.build-and-push.outputs.image-ref }}"

0 commit comments

Comments
 (0)