diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5ae7fb1..b35a6f5 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,11 +9,6 @@ updates: default-days: 7 exclude: - "devantler-tech/*" - # The manifests publisher stays on a revision the platform has approved for this - # tenant (its publish-workflow-canonical-approvals list); the platform refuses a - # publication signed by any other. #61 restored it once and Dependabot moved it - # off again twice, so the platform's daily publisher regeneration fails on aws - # (devantler-tech/platform#5267). Move this pin by hand, in its own change, once - # the platform approves a newer revision. - ignore: - - dependency-name: "devantler-tech/.github/.github/workflows/publish-manifests.yaml" + # The publish-app action is an ordinary dependency: releases are signed by this + # repository's own cd.yaml on its tag, whatever action revision runs + # (devantler-tech/monorepo ADR 0017), so no platform approval gates its updates. diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 1984196..abba6cb 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -2,18 +2,18 @@ name: 🚀 CD # Publishes the desired AWS state (deploy/) as a cosign-signed OCI manifests # artifact consumed by the platform cluster's `aws` tenant. There is NO -# container image here — only manifests — so it delegates to the shared -# manifests-only publish workflow in devantler-tech/.github (the -# manifests-only sibling of publish-app.yaml). The OCI name defaults to this -# repository (devantler-tech/aws), so the artifact lands at -# oci://ghcr.io/devantler-tech/aws/manifests. +# container image here, only manifests, so the shared publish-app action runs +# in `manifests` mode. The OCI name defaults to this repository +# (devantler-tech/aws), so the artifact lands at +# oci://ghcr.io/devantler-tech/aws/manifests, tagged with the release version +# and `latest`. # -# Because signing runs INSIDE the reusable workflow, the cosign certificate -# identity (OIDC subject) is that workflow's path — -# https://github.com/devantler-tech/.github/.github/workflows/publish-manifests.yaml@ -# — NOT this repo's cd.yaml. The platform `aws` OCIRepository's -# verify.matchOIDCIdentity.subject must match that, so the platform has to -# accept a revision before this repository releases with it. +# The action runs directly in this workflow, so the cosign certificate identity +# (OIDC subject) is this repository's own release workflow on its tag — +# https://github.com/devantler-tech/aws/.github/workflows/cd.yaml@refs/tags/vX.Y.Z +# — whatever action revision runs (devantler-tech/monorepo ADR 0017). The +# platform `aws` OCIRepository's verify.matchOIDCIdentity.subject accepts that +# identity, so a new action revision needs no platform approval. on: push: @@ -25,21 +25,30 @@ permissions: {} jobs: publish-manifests: name: 🗳️ Publish manifests + runs-on: ubuntu-latest + timeout-minutes: 30 + # Serialize this repository's publishers and never cancel one mid-release. + concurrency: + group: publish-verified-${{ github.repository }} + queue: max + cancel-in-progress: false permissions: - contents: read # checkout + contents: read # checkout and the default-branch fetch packages: write # push the OCI artifact to GHCR - id-token: write # keyless cosign signing (Fulcio + Rekor via GitHub OIDC) - # Pinned to the released commit SHA (zizmor blanket policy requires a hash; - # the SHA must be reachable from a tag, or zizmor flags it as an impostor). - # Dependabot's github-actions ecosystem manages this pin. - # Keep the ref a 40-hex commit: it is part of the cosign subject the platform - # verifies, so its shape is load-bearing here. A ref the verifier does not - # accept fails nothing in this repo — the artifact still publishes, signed - # under an identity the platform rejects, and the `aws` tenant stops - # reconciling until the ref is put back. Before a bumped pin releases, the - # platform's accepted revisions for this tenant must already include it. - # Keep the consumer-approved signer until its replacement is deployed and - # independently verified by the platform (devantler-tech/platform#5267). - uses: devantler-tech/.github/.github/workflows/publish-manifests.yaml@2fa404276b0ce5c0527683b080e39045045c4e42 # v7.2.10 - with: - enable-caller-pin: true + id-token: write # keyless cosign signing as this workflow (Fulcio + Rekor via 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 + # Pinned to the released commit SHA (zizmor blanket policy requires a hash; + # the SHA must be reachable from a tag, or zizmor flags it as an impostor). + # Dependabot's github-actions ecosystem manages this pin. + - name: 📦 Publish signed manifests + uses: devantler-tech/.github/actions/publish-app@d70d50665465117f01104313e53057374a96a1a3 # v21.7.2 + with: + mode: manifests diff --git a/AGENTS.md b/AGENTS.md index 986e0cd..d325b30 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -47,11 +47,13 @@ It mirrors the `devantler-tech/.github` repo's `github-config` tenant pattern. provider config here. - **Release flow:** squash-merge with a Conventional-Commit PR title → semantic-release cuts the version on `main` push → the `v*` tag triggers `cd.yaml`, which publishes and - cosign-signs the artifact via the shared `publish-manifests.yaml` workflow in - `devantler-tech/.github`. The signing identity is that workflow's path at the pinned - commit (`devantler-tech/.github/.github/workflows/publish-manifests.yaml@`), and the - platform `aws` tenant's verifier must accept it. Dependabot bumps that pin; the platform's - accepted revisions must include a bumped commit before a release ships with it. + cosign-signs the artifact by running the shared `publish-app` action from + `devantler-tech/.github` in `manifests` mode, directly in that workflow. The signing + identity is this repository's own `cd.yaml` on the release tag + (`devantler-tech/aws/.github/workflows/cd.yaml@refs/tags/vX.Y.Z`, ADR 0017), which the + platform `aws` tenant's verifier accepts. Dependabot bumps the action's commit pin; a new + revision needs no platform approval. Keep the action called directly in `cd.yaml`: from + inside a reusable workflow the signature would name that workflow instead. - **Required check:** `CI - Required Checks` (org ruleset). - **No secrets in this repo** — AWS credentials come from OpenBao via the platform; anything credential-shaped in a manifest is a bug. diff --git a/README.md b/README.md index 22b50c5..7fb1652 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,8 @@ the live tenant reconciles. Keep cloud credentials and provider authentication o platform injects the target namespace. - The **release pipeline** publishes `deploy/` as a cosign-signed OCI manifests artifact at `oci://ghcr.io/devantler-tech/aws/manifests` (see the [CD workflow](.github/workflows/cd.yaml)), - signed by the shared `publish-manifests.yaml` workflow in - [`devantler-tech/.github`](https://github.com/devantler-tech/.github) at a pinned commit. + signed as this repository's own CD workflow on the release tag by the shared `publish-app` + action from [`devantler-tech/.github`](https://github.com/devantler-tech/.github). - The [platform](https://github.com/devantler-tech/platform) consumes the artifact via the `aws` tenant (Flux `OCIRepository` + `Kustomization` with cosign verification), and the in-cluster AWS Crossplane provider reconciles the resources against AWS.