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' }}