From 593d6c552e65fbb585ffc40da21ed180f000e315 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..4d238d3 --- /dev/null +++ b/.butler/deployment.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "deployment": "geeksbot-release", + "environment": "production", + "images": { + "geeksbot_release_geeksbot_image": { + "name": "geeksbot", + "tag": "sha-{revision}" + } + }, + "revision_variable": "geeksbot_release_revision" +} diff --git a/.gitea/workflows/build-and-push.yml b/.gitea/workflows/build-and-push.yml index dcf7cf7..2c71a46 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' }}