Skip to content

feat(release-please): read org credentials so secrets: inherit works#16

Merged
kojiromike merged 1 commit into
mainfrom
kojiromike/release-please-inherit-secrets
May 20, 2026
Merged

feat(release-please): read org credentials so secrets: inherit works#16
kojiromike merged 1 commit into
mainfrom
kojiromike/release-please-inherit-secrets

Conversation

@kojiromike
Copy link
Copy Markdown
Contributor

Summary

  • Resolve App credentials from org-level vars.RELEASE_PLEASE_CLIENT_ID and secrets.RELEASE_PLEASE_PRIVATE_KEY when callers don't pass them explicitly, so consumers can simply use secrets: inherit.
  • Add secrets: inherit to this repo's own release-please.yml so its release PRs also get App-minted tokens.
  • Update README + caller stanza in the reusable workflow's header comment to reflect the new recommended pattern.

Why

The reusable workflow already accepted app-client-id/app-private-key as explicit secret inputs, but every consumer caller in the org omitted them, so release-please always fell back to GITHUB_TOKEN. PRs opened by GITHUB_TOKEN don't trigger downstream pull_request workflows (GitHub anti-recursion), which left release PRs un-mergeable on repos with required checks (e.g. openCoreEMR/oce-module-cardinal-ui#245).

Example failing PR: openCoreEMR/oce-module-cardinal-ui#245 — author shows app/github-actions, no downstream workflows ran.

Test plan

  • actionlint clean on both workflow files
  • Merge, let release-please cut a new tag (e.g. 0.0.7)
  • Verify this repo's own next release PR is opened by oce-release-please[bot] (not github-actions[bot]) and that downstream checks run on it
  • Fan out secrets: inherit to all 26 consumer repos pinning the new tag

The reusable workflow already supported app-client-id and app-private-key as
explicit secret inputs, but every consumer caller in the org omitted them, so
release-please always fell back to GITHUB_TOKEN. PRs opened by GITHUB_TOKEN
don't trigger downstream pull_request workflows (GitHub anti-recursion), which
left release PRs un-mergeable on repos with required checks.

Resolve the App credentials from the org-level variable
RELEASE_PLEASE_CLIENT_ID and the org-level secret RELEASE_PLEASE_PRIVATE_KEY
when no explicit inputs are given. Org variables auto-inherit into same-org
reusable workflows, and `secrets: inherit` on the caller forwards the secret.
Declare RELEASE_PLEASE_PRIVATE_KEY in workflow_call.secrets so actionlint
accepts the reference; callers should not pass it explicitly.

Also add `secrets: inherit` to this repo's own release-please.yml caller so
its own release PRs trigger downstream workflows.

Assisted-by: Claude Code
@kojiromike
Copy link
Copy Markdown
Contributor Author

Tested against release-please-test

Pointed openCoreEMR/release-please-test/.github/workflows/release-please.yml at this branch (@kojiromike/release-please-inherit-secrets) with secrets: inherit and no explicit app-client-id / app-private-key.

Run: https://github.com/openCoreEMR/release-please-test/actions/runs/26168197740

The mint step resolved both credentials from the org-level fallbacks:

APP_CLIENT_ID: Iv23liin2ldkTQQvr2ZR     ← vars.RELEASE_PLEASE_CLIENT_ID (org var, auto-inherited)
APP_PRIVATE_KEY: ***                     ← secrets.RELEASE_PLEASE_PRIVATE_KEY (org secret, forwarded by `inherit`)

actions/create-github-app-token minted a token, actions/checkout used it, and release-please ran with it. Confirms the new caller pattern works end-to-end.

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.

1 participant