|
42 | 42 | uses: docker/metadata-action@v4
|
43 | 43 | with:
|
44 | 44 | images: |
|
| 45 | + ${{ env.DOCKER_IMAGE_NAME }} |
45 | 46 | ${{ env.GHCR_IMAGE_NAME }}
|
46 | 47 | flavor: |
|
47 | 48 | latest=false
|
@@ -108,6 +109,7 @@ jobs:
|
108 | 109 | uses: docker/metadata-action@v4
|
109 | 110 | with:
|
110 | 111 | images: |
|
| 112 | + ${{ env.DOCKER_IMAGE_NAME }} |
111 | 113 | ${{ env.GHCR_IMAGE_NAME }}
|
112 | 114 | flavor: |
|
113 | 115 | latest=false
|
@@ -215,43 +217,51 @@ jobs:
|
215 | 217 | tags: |
|
216 | 218 | # Only version, no revision
|
217 | 219 | type=match,pattern=v(.*)-(.*),group=1
|
| 220 | +
|
| 221 | + # First, create manifests and push to GHCR |
| 222 | + |
218 | 223 | # Manifest for either branch or semver
|
219 |
| - - name: manifest-dockerhub |
220 |
| - run: docker manifest create ${{ steps.meta-dockerhub.outputs.tags }} --amend ${{ steps.meta-dockerhub.outputs.tags }}-amd64 --amend ${{ steps.meta-dockerhub.outputs.tags }}-arm64v8 |
221 | 224 | - name: manifest-ghcr
|
222 | 225 | run: docker manifest create ${{ steps.meta-ghcr.outputs.tags }} --amend ${{ steps.meta-ghcr.outputs.tags }}-amd64 --amend ${{ steps.meta-ghcr.outputs.tags }}-arm64v8
|
223 | 226 | # Optional manifest for latest
|
224 |
| - - name: manifest-dockerhub-latest |
225 |
| - run: docker manifest create ${{ env.DOCKER_IMAGE_NAME }}:latest --amend ${{ steps.meta-dockerhub.outputs.tags }}-amd64 --amend ${{ steps.meta-dockerhub.outputs.tags }}-arm64v8 |
226 |
| - if: startsWith(github.ref, 'refs/tags/') |
227 | 227 | - name: manifest-ghcr-latest
|
228 | 228 | run: docker manifest create ${{ env.GHCR_IMAGE_NAME }}:latest --amend ${{ steps.meta-ghcr.outputs.tags }}-amd64 --amend ${{ steps.meta-ghcr.outputs.tags }}-arm64v8
|
229 | 229 | if: startsWith(github.ref, 'refs/tags/')
|
230 | 230 | # Optional manifest for tag versions (includes revisions)
|
231 |
| - - name: manifest-dockerhub-tags |
232 |
| - run: docker manifest create ${{ steps.meta-dockerhub-tag.outputs.tags }} --amend ${{ steps.meta-dockerhub-tag.outputs.tags }}-amd64 --amend ${{ steps.meta-dockerhub-tag.outputs.tags }}-arm64v8 |
233 |
| - if: startsWith(github.ref, 'refs/tags/') |
234 | 231 | - name: manifest-ghcr-tags
|
235 | 232 | run: docker manifest create ${{ steps.meta-ghcr-tag.outputs.tags }} --amend ${{ steps.meta-ghcr-tag.outputs.tags }}-amd64 --amend ${{ steps.meta-ghcr-tag.outputs.tags }}-arm64v8
|
236 | 233 | if: startsWith(github.ref, 'refs/tags/')
|
237 | 234 | # Push various manifests
|
238 |
| - - name: push-dockerhub |
239 |
| - run: docker manifest push ${{ steps.meta-dockerhub.outputs.tags }} |
240 | 235 | - name: push-ghcr
|
241 | 236 | run: docker manifest push ${{ steps.meta-ghcr.outputs.tags }}
|
242 |
| - - name: push-dockerhub-latest |
243 |
| - run: docker manifest push ${{ env.DOCKER_IMAGE_NAME }}:latest |
244 |
| - if: startsWith(github.ref, 'refs/tags/') |
245 | 237 | - name: push-ghcr-latest
|
246 | 238 | run: docker manifest push ${{ env.GHCR_IMAGE_NAME }}:latest
|
247 | 239 | if: startsWith(github.ref, 'refs/tags/')
|
248 |
| - - name: push-dockerhub-tags |
249 |
| - run: docker manifest push ${{ steps.meta-dockerhub-tag.outputs.tags }} |
250 |
| - if: startsWith(github.ref, 'refs/tags/') |
251 | 240 | - name: push-ghcr-tags
|
252 | 241 | run: docker manifest push ${{ steps.meta-ghcr-tag.outputs.tags }}
|
253 | 242 | if: startsWith(github.ref, 'refs/tags/')
|
| 243 | + |
| 244 | + # Now, create manifests for Docker Hub |
| 245 | + |
| 246 | + - name: manifest-dockerhub |
| 247 | + run: docker manifest create ${{ steps.meta-dockerhub.outputs.tags }} --amend ${{ steps.meta-dockerhub.outputs.tags }}-amd64 --amend ${{ steps.meta-dockerhub.outputs.tags }}-arm64v8 |
| 248 | + - name: manifest-dockerhub-latest |
| 249 | + run: docker manifest create ${{ env.DOCKER_IMAGE_NAME }}:latest --amend ${{ steps.meta-dockerhub.outputs.tags }}-amd64 --amend ${{ steps.meta-dockerhub.outputs.tags }}-arm64v8 |
| 250 | + if: startsWith(github.ref, 'refs/tags/') |
| 251 | + - name: manifest-dockerhub-tags |
| 252 | + run: docker manifest create ${{ steps.meta-dockerhub-tag.outputs.tags }} --amend ${{ steps.meta-dockerhub-tag.outputs.tags }}-amd64 --amend ${{ steps.meta-dockerhub-tag.outputs.tags }}-arm64v8 |
| 253 | + if: startsWith(github.ref, 'refs/tags/') |
| 254 | + - name: push-dockerhub |
| 255 | + run: docker manifest push ${{ steps.meta-dockerhub.outputs.tags }} |
| 256 | + - name: push-dockerhub-latest |
| 257 | + run: docker manifest push ${{ env.DOCKER_IMAGE_NAME }}:latest |
| 258 | + if: startsWith(github.ref, 'refs/tags/') |
| 259 | + - name: push-dockerhub-tags |
| 260 | + run: docker manifest push ${{ steps.meta-dockerhub-tag.outputs.tags }} |
| 261 | + if: startsWith(github.ref, 'refs/tags/') |
| 262 | + |
254 | 263 | # Update Docker Hub from README
|
| 264 | + |
255 | 265 | - name: Docker Hub Description
|
256 | 266 | uses: peter-evans/dockerhub-description@v3
|
257 | 267 | with:
|
|
0 commit comments