ci(images): add edge tag for v4.x SHA builds (#11022)
This commit is contained in:
commit
da29fdcc69
2 changed files with 28 additions and 7 deletions
32
.github/workflows/coolify-sha-build.yml
vendored
32
.github/workflows/coolify-sha-build.yml
vendored
|
|
@ -76,15 +76,35 @@ jobs:
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Create & publish manifest on ${{ env.GITHUB_REGISTRY }}
|
- name: Create & publish manifest on ${{ env.GITHUB_REGISTRY }}
|
||||||
|
env:
|
||||||
|
REGISTRY: ${{ env.GITHUB_REGISTRY }}
|
||||||
|
BRANCH: ${{ github.ref_name }}
|
||||||
|
SHA: ${{ github.sha }}
|
||||||
run: |
|
run: |
|
||||||
|
IMAGE="${REGISTRY}/${IMAGE_NAME}"
|
||||||
|
TAG_ARGS=(--tag "${IMAGE}:sha-${SHA}")
|
||||||
|
# Moving tag for the latest production-line SHA image (v4.x only).
|
||||||
|
if [ "${BRANCH}" = "v4.x" ]; then
|
||||||
|
TAG_ARGS+=(--tag "${IMAGE}:edge")
|
||||||
|
fi
|
||||||
docker buildx imagetools create \
|
docker buildx imagetools create \
|
||||||
${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:sha-${{ github.sha }}-amd64 \
|
"${IMAGE}:sha-${SHA}-amd64" \
|
||||||
${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:sha-${{ github.sha }}-aarch64 \
|
"${IMAGE}:sha-${SHA}-aarch64" \
|
||||||
--tag ${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:sha-${{ github.sha }}
|
"${TAG_ARGS[@]}"
|
||||||
|
|
||||||
- name: Create & publish manifest on ${{ env.DOCKER_REGISTRY }}
|
- name: Create & publish manifest on ${{ env.DOCKER_REGISTRY }}
|
||||||
|
env:
|
||||||
|
REGISTRY: ${{ env.DOCKER_REGISTRY }}
|
||||||
|
BRANCH: ${{ github.ref_name }}
|
||||||
|
SHA: ${{ github.sha }}
|
||||||
run: |
|
run: |
|
||||||
|
IMAGE="${REGISTRY}/${IMAGE_NAME}"
|
||||||
|
TAG_ARGS=(--tag "${IMAGE}:sha-${SHA}")
|
||||||
|
# Moving tag for the latest production-line SHA image (v4.x only).
|
||||||
|
if [ "${BRANCH}" = "v4.x" ]; then
|
||||||
|
TAG_ARGS+=(--tag "${IMAGE}:edge")
|
||||||
|
fi
|
||||||
docker buildx imagetools create \
|
docker buildx imagetools create \
|
||||||
${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:sha-${{ github.sha }}-amd64 \
|
"${IMAGE}:sha-${SHA}-amd64" \
|
||||||
${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:sha-${{ github.sha }}-aarch64 \
|
"${IMAGE}:sha-${SHA}-aarch64" \
|
||||||
--tag ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:sha-${{ github.sha }}
|
"${TAG_ARGS[@]}"
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ ## Branch Strategy
|
||||||
|
|
||||||
| Branch | Role | Docker image tags | How it ships |
|
| Branch | Role | Docker image tags | How it ships |
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
| **`v4.x`** | Production / releasable line | `sha-<commit>` via **Build Coolify (SHA)** | GitHub release promotes the SHA image to a semantic version (and `latest` for stable releases) |
|
| **`v4.x`** | Production / releasable line | `sha-<commit>` and moving `edge` via **Build Coolify (SHA)** | GitHub release promotes the SHA image to a semantic version (and `latest` for stable releases) |
|
||||||
| **`next`** | Development line for features and larger changes | Branch tag (for example `next`) via **Staging Build** | Becomes production only after merge into `v4.x` |
|
| **`next`** | Development line for features and larger changes | Branch tag (for example `next`) via **Staging Build** | Becomes production only after merge into `v4.x` |
|
||||||
|
|
||||||
### Where to merge
|
### Where to merge
|
||||||
|
|
@ -59,6 +59,7 @@ ## Release Process
|
||||||
- Merge the release commit into `v4.x` through a pull request.
|
- Merge the release commit into `v4.x` through a pull request.
|
||||||
- The `Build Coolify (SHA)` workflow builds AMD64 and ARM64 images and publishes them to Docker Hub and GHCR using immutable architecture tags.
|
- The `Build Coolify (SHA)` workflow builds AMD64 and ARM64 images and publishes them to Docker Hub and GHCR using immutable architecture tags.
|
||||||
- After both builds complete, the workflow creates the multi-architecture `sha-<commit-sha>` manifest in both registries.
|
- After both builds complete, the workflow creates the multi-architecture `sha-<commit-sha>` manifest in both registries.
|
||||||
|
- For pushes to **`v4.x`**, the same multi-architecture manifest is also tagged as `edge`, so `coollabsio/coolify:edge` always points at the latest production-line SHA image. Builds from `main` publish only the immutable `sha-<commit-sha>` tags.
|
||||||
- This workflow does not update a semantic version tag or `latest`.
|
- This workflow does not update a semantic version tag or `latest`.
|
||||||
|
|
||||||
3. **Wait for the SHA Image**
|
3. **Wait for the SHA Image**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue