Skip to content

ci: fix BCR publish job startup_failure (drop job-level permissions) - #17

Merged
helly25 merged 1 commit into
mainfrom
ci/fix-bcr-publish-permissions
Jun 14, 2026
Merged

helly25 merged 1 commit into
mainfrom
ci/fix-bcr-publish-permissions

Conversation

@helly25

@helly25 helly25 commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

The 0.3.1 release run hit startup_failure (no jobs ran). Isolated to the publish job in release.yml: the standalone publish.yaml dispatch validated and ran (authenticated with the PAT, cloned the BCR fork), so the publish chain is sound. The only structural delta from the proven rules_lint pattern was a job-level permissions: block on the publish job. Removing it to match. Re-cut 0.3.1 after merge.

The release workflow failed at startup_failure with the `publish` job
carrying a job-level `permissions:` block while calling the local
reusable `publish.yaml`. Match the proven bazel-contrib/rules_lint
pattern (no per-job permissions on the publish call); publish-to-bcr
uses the BCR_PUBLISH_TOKEN PAT for the fork push + PR.
@helly25
helly25 requested a review from Fab-Cat June 14, 2026 16:04
@helly25
helly25 enabled auto-merge (squash) June 14, 2026 16:04
@helly25
helly25 merged commit 7666f51 into main Jun 14, 2026
8 checks passed
@helly25
helly25 deleted the ci/fix-bcr-publish-permissions branch June 14, 2026 16:07
helly25 added a commit that referenced this pull request Jun 14, 2026
The 0.3.1 release startup-failed: a called reusable workflow cannot
exceed the caller's permissions, and the two sides didn't line up.

- release.yml publish job: grant `contents: write` (PR #17 wrongly
  removed it, leaving the default `contents: read`, which rejected
  publish.yaml's `contents: write` job).
- publish.yaml: drop top-level `permissions: read-all`; as a reusable
  workflow it forced the caller to grant every read scope (which a
  write-only grant doesn't include). Match the rules_lint pattern where
  the wrapper requests only its job's scopes.

Net: caller grants `contents: write`, publish.yaml requests exactly
`contents: write` -> valid. (Proven sufficient: the standalone dispatch
ran publish-to-bcr with contents:write on the job.)
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