Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
57 changes: 32 additions & 25 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,37 @@ 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 }}
queue: max
cancel-in-progress: false
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
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
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading