From 2fc27d2b61495826d0cc7db43f2945fcd45db38b Mon Sep 17 00:00:00 2001 From: Nikolai Emil Damm Date: Mon, 16 Nov 2026 13:31:36 +0100 Subject: [PATCH 1/2] refactor(release): sign releases as this repository with the shared publish action cd.yaml now runs the commit-pinned devantler-tech/.github/actions/publish-app action (v21.7.2) directly, in the minimal tag-only, credential-free frame the template's publish-pin check enforces. The image and the manifests artifact are signed as this repository's cd.yaml on the release tag (ADR 0017) instead of the shared reusable publisher, so no platform approval gates a new revision. The artifact name, image name and version tags are unchanged. Dependabot no longer holds the shared publisher back, and the CI comment on the publish-pin job describes what it now enforces. Fixes #383 Co-Authored-By: Claude Opus 5.5 --- .github/dependabot.yml | 13 +++------ .github/workflows/cd.yaml | 56 ++++++++++++++++++++++----------------- .github/workflows/ci.yaml | 10 +++---- 3 files changed, 39 insertions(+), 40 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8362816..9f7e800 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -71,17 +71,10 @@ updates: commit-message: prefix: "ci" include: "scope" - # The application publisher stays on the exact revision Platform has reviewed and approved for - # tenants, which the `📌 Refuse an unapproved publish-app pin` CI check enforces. Every - # devantler-tech/.github release moves the publisher's tag together with the other callers, so - # while Dependabot proposed it, every group pull request needed a hand-made commit putting the - # publisher back (#358). Move this pin by hand, in its own change, once Platform approves a - # newer revision. Ignoring it also silences security updates for the publisher, which is - # intended: only Platform's approval may move it. - ignore: - - dependency-name: "devantler-tech/.github/.github/workflows/publish-app.yaml" # The caller-pin contract keeps the maintained release and template-sync callers on one - # commit. Grouping keeps them from diverging. + # commit. Grouping keeps them from diverging. The publish-app action moves with them: releases + # are signed by this repository's own cd.yaml on its tag, whatever action revision runs + # (devantler-tech/monorepo ADR 0017), so a new revision needs no Platform approval. groups: devantler-tech-actions: patterns: diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 8bbf349..9ad0b14 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -10,30 +10,36 @@ permissions: {} jobs: publish: name: Publish - # Skipped in the template repo itself (it ships no app); runs in every tenant - # created from this template. The template is matched by its repository ID, - # which survives the rename from platform-tenant-template to application-template. + # The upstream template has no application to publish; its ID survives renames. if: github.repository_id != '1253884448' + runs-on: ubuntu-latest + timeout-minutes: 60 + # Serialize this repository's publishers and never cancel one mid-release. + concurrency: + group: publish-${{ github.repository }} + cancel-in-progress: false permissions: - contents: read # checkout - packages: write # push image + manifests OCI artifact - id-token: write # keyless cosign signing (via GitHub OIDC) - uses: devantler-tech/.github/.github/workflows/publish-app.yaml@af042c540ce8db4d64add98c34b5c57691e0e812 # v19.0.5 - with: - # publish-app pins the freshly built image digest into the container with - # this name in deploy/deployment.yaml. Keep that container's name equal to - # the repository name (the platform's signed-publish convention). - app-name: ${{ github.event.repository.name }} - # The signature this publish mints carries the `uses:` ref above in its - # certificate. Platform has independently approved this exact maintained - # revision for manifests, admission and node pulls. Other maintained - # revisions, tags and branches fail closed; a full SHA alone does not - # grant approval. The guard below checks only that the ref is a commit - # SHA, so an unapproved SHA still publishes, but its artifact never - # verifies in-cluster and the tenant silently stops reconciling. Get the - # new revision approved in Platform before changing this pin. - # - # Enabling the guard adds the producer-side half: the publish refuses to - # sign at all, before the build, so a tag or branch ref surfaces here as a failed - # release instead of as an artifact the cluster quietly rejects. - enable-caller-pin: true + contents: read # checkout and the default-branch fetch + packages: write # push the image and the manifests OCI artifact + id-token: write # keyless cosign signing as this workflow (GitHub OIDC) + steps: + - name: 🔒 Harden runner + uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4 + with: + egress-policy: audit + - name: 📥 Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false # required: publish-app refuses a persisted credential + # The action runs directly in this workflow, so the image and the manifests are signed as + # this repository's cd.yaml on the release tag (devantler-tech/monorepo ADR 0017). The + # platform trusts that identity, so a new action revision needs no platform approval. + - name: 📦 Publish signed application + id: publish + uses: devantler-tech/.github/actions/publish-app@d70d50665465117f01104313e53057374a96a1a3 # v21.7.2 + with: + # publish-app pins the freshly built image digest into the container with this name. + # Keep that container's name equal to the repository name. + app-name: ${{ github.event.repository.name }} + # Relative to deploy/. The base/dev/prod split moves it to base/deployment.yaml. + app-manifest: deployment.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d40ef73..9611e92 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -160,7 +160,7 @@ jobs: # The portable pin contract ships from platform-tenant-template and is deliberately NOT # tenant-ignored, so it lands here on every sync. It validates immutable maintained - # callers, keeping release and template-sync aligned and the publisher independently approved. + # callers, keeping release and template-sync aligned and the publisher pinned to a tagged commit. # A caller reverting to a movable tag is the ordinary outcome of a hand edit or a bad merge, and it # is exactly what this guard refuses. The template's own scaffold contract already specifies this # wiring by name — a `workflow-caller-pins` job running the script, and required checks depending @@ -212,10 +212,10 @@ jobs: - name: 🏷️ Validate which dependency updates release run: sh scripts/release-classification.test.sh - # The platform deploys a release only when its publish-app.yaml revision is approved for this tenant. - # A PR that moves the pin to an unapproved revision would ship a release the platform refuses, so the - # template's check compares the base and head pins and fails the move here instead. An unchanged pin - # passes without contacting the platform. + # Releases are signed by this repository's own cd.yaml on the release tag (devantler-tech/monorepo + # ADR 0017), and the platform trusts exactly that identity. The template's check refuses a cd.yaml + # that leaves the minimal tag-only, credential-free frame those signatures rely on, and still holds + # back a move back to a shared publisher revision the platform has not approved for this tenant. publish-pin-approved: name: Publish Pin Approved runs-on: ubuntu-latest From cceb86e62a557e9d0c4cc777ea5bd20862586ba4 Mon Sep 17 00:00:00 2001 From: Nikolai Emil Damm Date: Mon, 16 Nov 2026 14:20:29 +0100 Subject: [PATCH 2/2] fix(release): retain queued tenant publications --- .github/workflows/cd.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 9ad0b14..5f70310 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -17,6 +17,7 @@ jobs: # Serialize this repository's publishers and never cancel one mid-release. concurrency: group: publish-${{ github.repository }} + queue: max cancel-in-progress: false permissions: contents: read # checkout and the default-branch fetch