Skip to content

ci(go-lib): grant id-token and attestations to release caller template#163

Merged
CybotTM merged 1 commit into
mainfrom
fix/golib-release-caller-perms
Jun 2, 2026
Merged

ci(go-lib): grant id-token and attestations to release caller template#163
CybotTM merged 1 commit into
mainfrom
fix/golib-release-caller-perms

Conversation

@CybotTM

@CybotTM CybotTM commented Jun 2, 2026

Copy link
Copy Markdown
Member

Problem

The go-lib release.yml caller template grants only contents: write, but the golib-create-release reusable workflow's release job requests id-token: write (cosign keyless) and attestations: write (added in #16). A called reusable workflow cannot request more permissions than the calling job grants, so the run fails at startup.

This was observed on netresearch/go-cron v0.15.0 — the first release tag in a go-lib repo since the reusable-workflow migration. Its Release workflow startup-failed with "workflow file issue".

Fix

Grant the go-lib caller id-token: write and attestations: write in addition to contents: write — mirroring the go-app template, which already has all three.

Impact

Affects every repo consuming the go-lib template's release workflow. After merge, those repos pick up the fix on their next template sync.

The go-lib release.yml caller granted only `contents: write`, but the
golib-create-release reusable workflow's release job requests
`id-token: write` (cosign keyless) and `attestations: write` (#16). A
called reusable workflow requesting more permissions than the caller
grants fails at startup, so every go-lib repo's release workflow
startup-failed on its first tag since the migration (observed on
netresearch/go-cron v0.15.0).

Mirror the go-app template, which already grants all three.

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
Copilot AI review requested due to automatic review settings June 2, 2026 15:31
@sonarqubecloud

sonarqubecloud Bot commented Jun 2, 2026

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the GitHub Actions release workflow for the Go library template to include 'id-token: write' and 'attestations: write' permissions. There are no review comments, and I have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a GitHub Actions permission mismatch in the go-lib release caller template so that repositories using this template can successfully invoke the golib-create-release.yml reusable workflow (which requires id-token: write for keyless Cosign signing and attestations: write for GitHub attestations).

Changes:

  • Extend the templates/go-lib release workflow caller job permissions to include id-token: write.
  • Extend the templates/go-lib release workflow caller job permissions to include attestations: write.
  • Align go-lib’s release caller permissions with the reusable workflow’s release job requirements (and the existing go-app template pattern).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@CybotTM CybotTM merged commit 24af9ab into main Jun 2, 2026
12 checks passed
@CybotTM CybotTM deleted the fix/golib-release-caller-perms branch June 2, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants