8080 elif [ -n "${{ github.event.release.tag_name }}" ]; then
8181 echo "Release tag: ${{ github.event.release.tag_name }}"
8282 echo "tag=ui-${{ github.event.release.tag_name }}" >> "$GITHUB_OUTPUT"
83+ echo "tag_dynamic=ui-dynamic-${{ github.event.release.tag_name }}" >> "$GITHUB_OUTPUT"
84+ echo "tag_stable=stable" >> "$GITHUB_OUTPUT"
8385 else
8486 echo "Not a PR branch"
8587 echo "tag=ui" >> "$GITHUB_OUTPUT"
@@ -195,6 +197,7 @@ jobs:
195197 elif [ -n "${{ github.event.release.tag_name }}" ]; then
196198 echo "Release tag: ${{ github.event.release.tag_name }}"
197199 echo "tag=${{ github.event.release.tag_name }}" >> "$GITHUB_OUTPUT"
200+ echo "tag_stable=stable" >> "$GITHUB_OUTPUT"
198201 else
199202 echo "Not a PR branch"
200203 echo "tag=latest" >> "$GITHUB_OUTPUT"
@@ -243,6 +246,8 @@ jobs:
243246 tags : |
244247 ghcr.io/dan-online/autopulse:${{ steps.tag.outputs.tag }}${{ matrix.platform.tag }}
245248 danonline/autopulse:${{ steps.tag.outputs.tag }}${{ matrix.platform.tag }}
249+ ${{ steps.tag.outputs.tag_stable && format('ghcr.io/dan-online/autopulse:{0}{1}', steps.tag.outputs.tag_stable, matrix.platform.tag) || '' }}
250+ ${{ steps.tag.outputs.tag_stable && format('danonline/autopulse:{0}{1}', steps.tag.outputs.tag_stable, matrix.platform.tag) || '' }}
246251 labels : ${{ steps.meta.outputs.labels }}
247252 platforms : ${{ matrix.platform.name }}
248253 build-args : ${{ matrix.platform.build_args }}
@@ -257,6 +262,8 @@ jobs:
257262 tags : |
258263 ghcr.io/dan-online/autopulse:${{ steps.tag.outputs.tag }}-${{ matrix.feature }}${{ matrix.platform.tag }}
259264 danonline/autopulse:${{ steps.tag.outputs.tag }}-${{ matrix.feature }}${{ matrix.platform.tag }}
265+ ${{ steps.tag.outputs.tag_stable && format('ghcr.io/dan-online/autopulse:{0}-{1}{2}', steps.tag.outputs.tag_stable, matrix.feature, matrix.platform.tag) || '' }}
266+ ${{ steps.tag.outputs.tag_stable && format('danonline/autopulse:{0}-{1}{2}', steps.tag.outputs.tag_stable, matrix.feature, matrix.platform.tag) || '' }}
260267 labels : ${{ steps.meta.outputs.labels }}
261268 platforms : ${{ matrix.platform.name }}
262269 build-args : ${{ matrix.platform.build_args }}
@@ -278,6 +285,7 @@ jobs:
278285 elif [ -n "${{ github.event.release.tag_name }}" ]; then
279286 echo "Release tag: ${{ github.event.release.tag_name }}"
280287 echo "tag=${{ github.event.release.tag_name }}" >> "$GITHUB_OUTPUT"
288+ echo "tag_stable=stable" >> "$GITHUB_OUTPUT"
281289 else
282290 echo "Not a PR branch"
283291 echo "tag=latest" >> "$GITHUB_OUTPUT"
@@ -306,6 +314,7 @@ jobs:
306314 GHCR_BASE="ghcr.io/dan-online/autopulse"
307315 DOCKERHUB_BASE="danonline/autopulse"
308316 TAG="${{ steps.tag.outputs.tag }}"
317+ TAG_STABLE="${{ steps.tag.outputs.tag_stable }}"
309318
310319 # First, create and push all manifests to GHCR
311320 # Get digests from GHCR only
@@ -352,6 +361,35 @@ jobs:
352361 --tag danonline/autopulse:${TAG}-sqlite \
353362 ghcr.io/dan-online/autopulse:${TAG}-sqlite
354363
364+ if [ -n "$TAG_STABLE" ]; then
365+ echo "Creating stable manifests..."
366+ docker manifest create ${GHCR_BASE}:${TAG_STABLE} \
367+ --amend ${GHCR_BASE}@${AMD64_DIGEST} \
368+ --amend ${GHCR_BASE}@${ARM64_DIGEST}
369+ docker manifest create ${GHCR_BASE}:${TAG_STABLE}-postgres \
370+ --amend ${GHCR_BASE}@${POSTGRES_AMD64_DIGEST} \
371+ --amend ${GHCR_BASE}@${POSTGRES_ARM64_DIGEST}
372+ docker manifest create ${GHCR_BASE}:${TAG_STABLE}-sqlite \
373+ --amend ${GHCR_BASE}@${SQLITE_AMD64_DIGEST} \
374+ --amend ${GHCR_BASE}@${SQLITE_ARM64_DIGEST}
375+
376+ docker manifest push ${GHCR_BASE}:${TAG_STABLE}-postgres
377+ docker manifest push ${GHCR_BASE}:${TAG_STABLE}-sqlite
378+ docker manifest push ${GHCR_BASE}:${TAG_STABLE}
379+
380+ docker buildx imagetools create \
381+ --tag danonline/autopulse:${TAG_STABLE} \
382+ ghcr.io/dan-online/autopulse:${TAG_STABLE}
383+
384+ docker buildx imagetools create \
385+ --tag danonline/autopulse:${TAG_STABLE}-postgres \
386+ ghcr.io/dan-online/autopulse:${TAG_STABLE}-postgres
387+
388+ docker buildx imagetools create \
389+ --tag danonline/autopulse:${TAG_STABLE}-sqlite \
390+ ghcr.io/dan-online/autopulse:${TAG_STABLE}-sqlite
391+ fi
392+
355393 echo "Copy images over to Docker Hub..."
356394 # docker pull ${GHCR_BASE}:${TAG} -q
357395 # docker pull ${GHCR_BASE}:${TAG}-postgres -q
0 commit comments