Skip to content

Conversation

@marcusburghardt
Copy link
Contributor

Summary

release-please creates a PR bumping versions and drafting a changelog.
By default the PR is owned by github-actions and therefore CI tests from other workflows are not executed to prevent loop. This PR makes release-please to use a GH App token.

Related Issues

CI tests are not executed when a PR is owned by github-actions[bot]

This repository has required tests triggered by other workflows. Since these tests are not executed, the PR cannot be merged, ultimately impacting the release process.

Review Hints

Here is the relevant documentation about "Triggering a workflow from a workflow":

It is also mentioned in the release-please documentation:

This simpler option would be to create a PAT but this does not scale well, so a Github App using a limited INSTALLATION TOKEN should work better.

The workflow was created based on official documentation and inspired by the work from @huiwangredhat in complytime/cac-content#26

@marcusburghardt marcusburghardt changed the title ci: run release-please with a limited installation token ci: CPLYTM-821 - run release-please with an installation token Jun 2, 2025
@marcusburghardt
Copy link
Contributor Author

I need to better check how to address the kics alert. Moving to draft until I can continue working on it.

@marcusburghardt marcusburghardt marked this pull request as draft June 2, 2025 16:54
@marcusburghardt marcusburghardt marked this pull request as ready for review June 2, 2025 17:14
Copy link
Member

@jpower432 jpower432 left a comment

Choose a reason for hiding this comment

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

Added one comment for possible simplification.

Copy link
Member

@huiwangredhat huiwangredhat left a comment

Choose a reason for hiding this comment

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

@marcusburghardt Great! After the review, I learned how to easily obtain a GitHub app token and also how to skip the bash script in favor of a python script.

release-please creates a PR bumping versions and drafting a changelog.
By default the PR is owned by github-actions and therefore CI tests from
other workflows are not executed to prevent loop. This commit makes
release-please to use a GH App token.

Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
Replaced the python code by actions/create-github-app-token to achieve
the same outcome in a much simpler way. This action already ensures the
token is masked and expiration is tied to the job. Explicit permissions
are redundant, but it is intentional to make them explicit.

Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
@marcusburghardt
Copy link
Contributor Author

Rebased

@marcusburghardt
Copy link
Contributor Author

@marcusburghardt Great! After the review, I learned how to easily obtain a GitHub app token and also how to skip the bash script in favor of a python script.

Nice @huiwangredhat , thanks to @jpower432 I also learned about the create-github-app-token and implemented in the last commit. Things got much simpler. :)

Copy link
Member

@huiwangredhat huiwangredhat left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Member

@jpower432 jpower432 left a comment

Choose a reason for hiding this comment

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

Nice work @marcusburghardt! Just left one comment regarding the permission of the default token.

@marcusburghardt marcusburghardt requested a review from jpower432 June 4, 2025 12:13
Copy link
Member

@jpower432 jpower432 left a comment

Choose a reason for hiding this comment

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

LGTM. The failing e2e job seems unrelated.

These permissions were defined for GITHUB_TOKEN and are no longer
necessary since release-please is now using an installation token.

Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
@marcusburghardt
Copy link
Contributor Author

For transparency, there are two force-pushes after the reviews. I first tried something to isolate the issue with CI tests then I reverted it to the state it was approved.

@marcusburghardt marcusburghardt merged commit 4102403 into complytime:main Jun 4, 2025
8 of 9 checks passed
@marcusburghardt marcusburghardt deleted the release_pr_tests branch June 4, 2025 12:49
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.

3 participants