Skip to content

Conversation

@ckyrouac
Copy link
Collaborator

@ckyrouac ckyrouac commented Aug 6, 2025

This uses the token generated in the GitHub app that has a limited
scope. Also refactors the commit/push steps to use the
create-pull-request action rather than manually committing and pushing.
This simplifies the token usage when committing/pushing.

@gemini-code-assist
Copy link
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@ckyrouac ckyrouac requested a review from cgwalters August 6, 2025 14:26
@cgwalters
Copy link
Collaborator

cgwalters commented Aug 6, 2025

I'm not sure it will work though, you might need to generate it as the owner.

I am not the owner of the repo anymore, CNCF is right?

The other option is to enable "Allow GitHub Actions to create and approve pull requests" on the repo and continue using the GITHUB_TOKEN (that's what I was doing on my fork while testing).

Ah. That seems...a bit dangerous to me. AFAIK the more tedious but also more secure/correct way is to make a Github App https://docs.github.com/en/apps/creating-github-apps/about-creating-github-apps/deciding-when-to-build-a-github-app

Last I looked, it wasn't terribly hard and would help unblock other automations too.

@ckyrouac
Copy link
Collaborator Author

ckyrouac commented Aug 6, 2025

Ah - looks like we can just create an empty app and use the generated token in the action via this: https://github.com/actions/create-github-app-token. I don't have permissions to the bootc-dev org settings to add the app though. Is that something I need to request from CNCF?

@cgwalters
Copy link
Collaborator

I was wrong and I am an Owner in the org as are several other people, you were not. I invited you. I am not sure what syncs that (but it's definitely something we want to automate from MAINTAINERS.md) or some other source of truth.

This uses the token generated in the GitHub app that has a limited
scope. Also refactors the commit/push steps to use the
create-pull-request action rather than manually committing and pushing.
This simplifies the token usage when committing/pushing.

Signed-off-by: ckyrouac <[email protected]>
@ckyrouac ckyrouac changed the title ci: Use RELEASE_TOKEN instead of GITHUB_TOKEN for release jobs ci: Refactor release action to use app and create-pull-request Aug 6, 2025
@ckyrouac
Copy link
Collaborator Author

ckyrouac commented Aug 6, 2025

thanks for adding me! I reworked this to use the GH app.

@ckyrouac ckyrouac merged commit 0da7858 into bootc-dev:main Aug 7, 2025
32 of 33 checks passed
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