Skip to content

Commit 4ecbf65

Browse files
committed
fix: use GHCR secrets and add Docker Hub push to release workflow
1 parent 860c2ce commit 4ecbf65

1 file changed

Lines changed: 26 additions & 3 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,21 +105,44 @@ jobs:
105105
type=semver,pattern={{major}}.{{minor}}
106106
type=raw,value=latest
107107
108+
- uses: docker/setup-qemu-action@v3
109+
108110
- uses: docker/setup-buildx-action@v3
109111

110112
- uses: docker/login-action@v3
111113
with:
112114
registry: ghcr.io
113-
username: ${{ github.actor }}
114-
password: ${{ secrets.GITHUB_TOKEN }}
115+
username: ${{ secrets.GHCR_LOGIN }}
116+
password: ${{ secrets.GHCR_PASSWORD }}
117+
118+
- uses: docker/login-action@v3
119+
with:
120+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
121+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
122+
123+
- name: Docker meta (Docker Hub)
124+
id: meta-dockerhub
125+
uses: docker/metadata-action@v5
126+
with:
127+
images: |
128+
butschster/buggregator
129+
tags: |
130+
type=semver,pattern={{version}}
131+
type=semver,pattern={{major}}.{{minor}}
132+
type=semver,pattern={{major}}
133+
type=raw,value=latest
115134
116135
- uses: docker/build-push-action@v6
117136
with:
118137
context: .
119138
push: true
120-
tags: ${{ steps.meta.outputs.tags }}
139+
tags: |
140+
${{ steps.meta.outputs.tags }}
141+
${{ steps.meta-dockerhub.outputs.tags }}
121142
labels: ${{ steps.meta.outputs.labels }}
122143
platforms: linux/amd64,linux/arm64
144+
cache-from: type=gha
145+
cache-to: type=gha,mode=max
123146

124147
release:
125148
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)