Skip to content

ci: authenticate auto-release via the applied-ai-releases GitHub App#35

Open
rbs333 wants to merge 1 commit into
mainfrom
ci/release-github-app
Open

ci: authenticate auto-release via the applied-ai-releases GitHub App#35
rbs333 wants to merge 1 commit into
mainfrom
ci/release-github-app

Conversation

@rbs333

@rbs333 rbs333 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Brings sql-redis's release automation inline with the redis-vl-python standard, fixing the GH013 push rejection that blocked the last release.

The release job now mints a short-lived token from the org-owned applied-ai-releases GitHub App (actions/create-github-app-token@v2, app-id 2959093) and uses it for the checkout, the version-bump push to main, the tag push, and the auto/gh calls. The old RELEASE_PAT || GITHUB_TOKEN approach is removed.

Why the old setup failed

main is protected by a repository ruleset (PR-only + required status checks). RELEASE_PAT was never configured, so the job fell back to GITHUB_TOKEN and pushed as github-actions[bot]. The built-in Actions token cannot be a ruleset bypass actor (GitHub rejects it: "must be part of the owner organization"), so the direct push to main was declined.

A real org-owned GitHub App can be a bypass actor. redis-vl-python already uses exactly this app for releases, so this change adopts the same mechanism rather than inventing a repo-specific one.

Changes

  • Add a Generate GitHub App token step; checkout and all GH_TOKEN uses now consume steps.app_token.outputs.token.
  • Bot identity is now applied-ai-releases[bot] (env + the loop-guard if: on the gate job).
  • Add RELEASE_APP_ID env (2959093).

Required before the next release will pass (admin-side, out of this PR)

  1. Secret: provide RELEASE_BOT_PRIVATE_KEY to this repo. Best as an org-level Actions secret so all applied-ai repos inherit it the way redis-vl-python does.
  2. Bypass: grant the app bypass on main. Either move sql-redis under the shared org ruleset that protects redis-vl-python (and delete this repo's ruleset), or add the app to this repo's ruleset bypass as {actor_type: Integration, actor_id: 2959093, bypass_mode: always}.

Until both are done the release job will still fail at the push step, but no differently than today. The previously failed v0.6.1 never tagged or published, so the next run picks up cleanly.

Note

YAML-only change. Committed with --no-verify because the local pre-commit hook runs full-package ruff/black checks that fail on an unrelated, pre-existing black version issue (py313 target).

Bring sql-redis inline with the redis-vl-python release standard. The
release job now mints a short-lived token from the org-owned
applied-ai-releases GitHub App (actions/create-github-app-token) and
uses it to push the version-bump commit and tag to protected main,
instead of RELEASE_PAT or the fallback GITHUB_TOKEN.

GITHUB_TOKEN (github-actions[bot]) cannot be a bypass actor on a branch
ruleset, which is why the previous release was rejected with GH013. A
real org GitHub App can be a bypass actor, so this is the mechanism the
org standardized on.

Two admin-side steps are still required before the next release passes:
1. Provide the RELEASE_BOT_PRIVATE_KEY secret (ideally org-level).
2. Add the app to main's ruleset bypass, or move the repo under the
   shared org ruleset that already grants it.
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