mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
ci(build): use rolling tags for main image builds
Pushes to main published three tags per commit (sha-<sha>, sha-<sha>-amd64, sha-<sha>-aarch64). Publish the per-arch images under rolling main-amd64/main-aarch64 tags instead, and keep one sha-<sha> manifest per commit next to a rolling main tag. Serialize runs so concurrent pushes cannot mix architectures, and label images with the source revision. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
fd85b740f5
commit
09af3e065a
@@ -1,4 +1,4 @@
|
||||
name: Build Coolify (SHA)
|
||||
name: Build Coolify Main
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -8,6 +8,10 @@ permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
concurrency:
|
||||
group: coolify-main-build
|
||||
cancel-in-progress: false
|
||||
|
||||
env:
|
||||
GITHUB_REGISTRY: ghcr.io
|
||||
DOCKER_REGISTRY: docker.io
|
||||
@@ -62,9 +66,11 @@ jobs:
|
||||
push: true
|
||||
build-args: |
|
||||
COOLIFY_VERSION=${{ steps.version.outputs.version }}
|
||||
labels: |
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
tags: |
|
||||
${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:sha-${{ steps.version.outputs.short_sha }}-${{ matrix.arch }}
|
||||
${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:sha-${{ steps.version.outputs.short_sha }}-${{ matrix.arch }}
|
||||
${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:main-${{ matrix.arch }}
|
||||
${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:main-${{ matrix.arch }}
|
||||
|
||||
merge-manifest:
|
||||
runs-on: ubuntu-24.04
|
||||
@@ -93,9 +99,10 @@ jobs:
|
||||
run: |
|
||||
IMAGE="${REGISTRY}/${IMAGE_NAME}"
|
||||
docker buildx imagetools create \
|
||||
"${IMAGE}:sha-${SHA}-amd64" \
|
||||
"${IMAGE}:sha-${SHA}-aarch64" \
|
||||
--tag "${IMAGE}:sha-${SHA}"
|
||||
"${IMAGE}:main-amd64" \
|
||||
"${IMAGE}:main-aarch64" \
|
||||
--tag "${IMAGE}:sha-${SHA}" \
|
||||
--tag "${IMAGE}:main"
|
||||
|
||||
- name: Create & publish manifest on ${{ env.DOCKER_REGISTRY }}
|
||||
env:
|
||||
@@ -104,9 +111,10 @@ jobs:
|
||||
run: |
|
||||
IMAGE="${REGISTRY}/${IMAGE_NAME}"
|
||||
docker buildx imagetools create \
|
||||
"${IMAGE}:sha-${SHA}-amd64" \
|
||||
"${IMAGE}:sha-${SHA}-aarch64" \
|
||||
--tag "${IMAGE}:sha-${SHA}"
|
||||
"${IMAGE}:main-amd64" \
|
||||
"${IMAGE}:main-aarch64" \
|
||||
--tag "${IMAGE}:sha-${SHA}" \
|
||||
--tag "${IMAGE}:main"
|
||||
|
||||
- uses: sarisia/actions-status-discord@v1
|
||||
if: always()
|
||||
Reference in New Issue
Block a user