From bd5e58d8f4dcb0a3a78e91e9576ae4dd12e0e249 Mon Sep 17 00:00:00 2001 From: Butler Agent Date: Fri, 11 Sep 2026 08:53:23 +0000 Subject: [PATCH] feat(delivery): publish immutable source images and declare release --- .butler/README.md | 5 +++++ .butler/deployment.json | 12 ++++++++++++ .gitea/workflows/build-and-push.yml | 4 ++-- 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 .butler/README.md create mode 100644 .butler/deployment.json diff --git a/.butler/README.md b/.butler/README.md new file mode 100644 index 0000000..a70684e --- /dev/null +++ b/.butler/README.md @@ -0,0 +1,5 @@ +# Service release contract + +Butler resolves this repository's protected source revision to verified immutable images. The platform updates only image references in the existing production Compose file and restarts only the already running application services. It preserves current environment, storage, routes, and provider configuration. It retains previous application images and restores them if readiness fails. + +Migration and maintenance images are pinned when declared, but this release operation does not run database migrations or maintenance jobs. A release requiring a schema change needs the corresponding explicit platform migration first. No homelab image-pin commit is required for an ordinary compatible application release. diff --git a/.butler/deployment.json b/.butler/deployment.json new file mode 100644 index 0000000..a779d6e --- /dev/null +++ b/.butler/deployment.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "deployment": "goff-release", + "environment": "production", + "images": { + "goff_release_goff_image": { + "name": "goff", + "tag": "sha-{revision}" + } + }, + "revision_variable": "goff_release_revision" +} diff --git a/.gitea/workflows/build-and-push.yml b/.gitea/workflows/build-and-push.yml index ad33e4f..4b43284 100644 --- a/.gitea/workflows/build-and-push.yml +++ b/.gitea/workflows/build-and-push.yml @@ -108,7 +108,7 @@ jobs: SHA: ${{ gitea.sha }} run: | set -euo pipefail - tags=() + tags=("$IMAGE_NAME:sha-$SHA") if [[ "$REF" == refs/tags/* ]]; then version="$REF_NAME" @@ -143,7 +143,7 @@ jobs: build_args+=(--tag "$tag") done - docker build "${build_args[@]}" . + docker build --label "org.opencontainers.image.revision=$GITHUB_SHA" "${build_args[@]}" . - name: Push image if: ${{ (steps.delivery.outputs.run == 'true') && github.event_name != 'pull_request' }}