Repository navigation
refactor(release): sign releases as this repository with the shared publish action #625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,18 +13,29 @@ jobs: | |
| # Reserved image-acceptance tags exercise AGE publication without advancing | ||
| # the controller image or manifest aliases. | ||
| if: ${{ !startsWith(github.ref_name, 'v0.0.0-age-proof.') }} | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| concurrency: | ||
| group: publish-${{ github.repository }} | ||
| cancel-in-progress: false | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Preserve the queue for pending release jobs. If one release is running and two more arrive, GitHub cancels the first pending release even with
|
||
| permissions: | ||
| contents: read # Checkout the tagged source. | ||
| contents: read # Checkout the tagged source and fetch the default branch. | ||
| packages: write # Publish the image and manifest artifact to GHCR. | ||
| id-token: write # Mint the keyless Sigstore signing identity. | ||
| # Sign only with a revision the platform's image rules already trust. v19.0.5 | ||
| # replaces v8.0.0, whose slot the platform needs for the next publisher | ||
| # (devantler-tech/platform#6227); the platform approves it for this consumer | ||
| # when it re-pins the controller. | ||
| uses: devantler-tech/.github/.github/workflows/publish-app.yaml@af042c540ce8db4d64add98c34b5c57691e0e812 # v19.0.5 | ||
| with: | ||
| app-name: data-product-controller | ||
| enable-caller-pin: true | ||
| steps: | ||
| - name: Checkout the immutable release source | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| ref: ${{ github.sha }} | ||
| persist-credentials: false | ||
|
|
||
| # Runs directly in this workflow, so the image and the manifests artifact are | ||
| # signed as this repository's cd.yaml on the release tag (devantler-tech/monorepo | ||
| # ADR 0017), whatever revision of the action runs. | ||
| - name: Publish and sign the release as this repository | ||
| uses: devantler-tech/.github/actions/publish-app@d70d50665465117f01104313e53057374a96a1a3 # v21.7.2 | ||
| with: | ||
| app-name: data-product-controller | ||
|
|
||
| publish-age: | ||
| name: Build, exercise, sign and verify AGE image | ||
|
|
@@ -209,9 +220,8 @@ jobs: | |
| docker pull "$image" | ||
| digest=$(docker image inspect "$image" --format '{{index .RepoDigests 0}}') | ||
| [[ "$digest" =~ ^ghcr.io/devantler-tech/khoist@sha256:[a-f0-9]{64}$ ]] | ||
| publisher_identity=$(go run ./scripts/publisher-identity) | ||
| cosign verify \ | ||
| --certificate-identity "$publisher_identity" \ | ||
| --certificate-identity "https://github.com/devantler-tech/khoist/.github/workflows/cd.yaml@refs/tags/$RELEASE_TAG" \ | ||
| --certificate-oidc-issuer https://token.actions.githubusercontent.com \ | ||
| --certificate-github-workflow-repository devantler-tech/khoist \ | ||
| --certificate-github-workflow-ref "refs/tags/$RELEASE_TAG" \ | ||
|
|
||
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep the existing publisher concurrency-group name.
The former publisher uses
publish-verified-${{ github.repository }}. This new group does not exclude an older release job that is still running. If that older job finishes after the first new release, it can overwrite bothlatestaliases with the older release. Retain the existing group name so both publisher definitions share the same lock. Addingqueue: maxalone does not prevent this overlap. (raw.githubusercontent.com)