Skip to content

Commit e01aeb7

Browse files
committed
ci: adopt consolidated ospo-reusable-workflows release.yaml
## What Collapse the three legacy `release` / `release_image` / `release_discussion` job calls into a single call to the consolidated `release.yaml` reusable workflow at v1.0.0 (`592067a6...`). Pass `image-name`, `create-attestation: true`, and `create-discussion: true` so the workflow handles GitHub release, container image build/push to GHCR, build provenance attestation, and announcement discussion in one draft-first pipeline. Also add a "💥 Breaking Changes" category to `release-drafter.yml`. ## Why The legacy three-workflow setup forced callers to wire up the same job chain by hand in every repo and made it easy for permissions, secrets, and ordering to drift. v1.0.0 of ospo-reusable-workflows owns the chain internally and exposes a single entry point. The "Breaking Changes" category matches the upstream release-drafter template (github-community-projects/ospo-reusable-workflows#134); the `breaking` label already maps to a major bump in `version-resolver`, so this just surfaces those PRs in their own changelog section. ## Notes - The job-level permission block now lists the union of what the called workflow's internal jobs need (contents/pull-requests/packages/id-token/attestations/discussions). A `uses:` caller can only grant — never expand — what the reusable workflow requests, so missing perms here silently disable features instead of erroring. - `image-registry` and `image-registry-username` moved from `secrets:` to inputs in v1.0.0 (defaults to `ghcr.io` and `github.actor`). Both defaults match the previous explicit values, so they're omitted. - `image-registry-password` stays a secret and continues to use `GITHUB_TOKEN` for ghcr.io pushes. - The reusable workflow's `release_discussion` job validates the discussion secrets at the step level and skips with a notice if they're unset, so the workflow keeps working even if the discussion secrets aren't configured. Signed-off-by: jmeridth <jmeridth@gmail.com>
1 parent 1878140 commit e01aeb7

2 files changed

Lines changed: 12 additions & 29 deletions

File tree

.github/release-drafter.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ template: |
88
See details of [all code changes](https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION) since previous release
99
1010
categories:
11+
- title: "💥 Breaking Changes"
12+
labels:
13+
- "breaking"
1114
- title: "🚀 Features"
1215
labels:
1316
- "feature"

.github/workflows/release.yml

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,41 +10,21 @@ permissions:
1010
jobs:
1111
release:
1212
permissions:
13-
contents: write
14-
pull-requests: read
15-
uses: github-community-projects/ospo-reusable-workflows/.github/workflows/release.yaml@a0cf79bd8756e0a9c1555bf4975eae7ce7a8e8dc
13+
contents: write # Create release and push tags
14+
pull-requests: read # Read PR labels for release-drafter
15+
packages: write # Push container image to ghcr.io
16+
id-token: write # Federate for artifact attestation
17+
attestations: write # Generate build provenance attestations
18+
discussions: write # Create release announcement discussion
19+
uses: github-community-projects/ospo-reusable-workflows/.github/workflows/release.yaml@592067a69a43d2285f933753d89a7c9d51b96530 # v1.0.0
1620
with:
1721
publish: true
1822
release-config-name: release-drafter.yml
19-
secrets:
20-
github-token: ${{ secrets.GITHUB_TOKEN }}
21-
release_image:
22-
needs: release
23-
permissions:
24-
contents: read
25-
packages: write
26-
id-token: write
27-
attestations: write
28-
uses: github-community-projects/ospo-reusable-workflows/.github/workflows/release-image.yaml@a0cf79bd8756e0a9c1555bf4975eae7ce7a8e8dc
29-
with:
3023
image-name: ${{ github.repository }}
31-
full-tag: ${{ needs.release.outputs.full-tag }}
32-
short-tag: ${{ needs.release.outputs.short-tag }}
24+
create-attestation: true
25+
create-discussion: true
3326
secrets:
3427
github-token: ${{ secrets.GITHUB_TOKEN }}
35-
image-registry: ghcr.io
36-
image-registry-username: ${{ github.actor }}
3728
image-registry-password: ${{ secrets.GITHUB_TOKEN }}
38-
release_discussion:
39-
needs: release
40-
permissions:
41-
contents: read
42-
discussions: write
43-
uses: github-community-projects/ospo-reusable-workflows/.github/workflows/release-discussion.yaml@a0cf79bd8756e0a9c1555bf4975eae7ce7a8e8dc
44-
with:
45-
full-tag: ${{ needs.release.outputs.full-tag }}
46-
body: ${{ needs.release.outputs.body }}
47-
secrets:
48-
github-token: ${{ secrets.GITHUB_TOKEN }}
4929
discussion-repository-id: ${{ secrets.RELEASE_DISCUSSION_REPOSITORY_ID }}
5030
discussion-category-id: ${{ secrets.RELEASE_DISCUSSION_CATEGORY_ID }}

0 commit comments

Comments
 (0)