Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI checks are not triggered by create-release-candidate action #662

Open
gmaclennan opened this issue Sep 5, 2024 · 0 comments · May be fixed by #673
Open

CI checks are not triggered by create-release-candidate action #662

gmaclennan opened this issue Sep 5, 2024 · 0 comments · May be fixed by #673

Comments

@gmaclennan
Copy link
Member

When creating a PR via the new create-release-candidate action, CI checks do not run. According to Github docs:

When you use the repository's GITHUB_TOKEN to perform tasks, events triggered by the GITHUB_TOKEN will not create a new workflow run. This prevents you from accidentally creating recursive workflow runs. For example, if a workflow run pushes code using the repository's GITHUB_TOKEN, a new workflow will not run even when the repository contains a workflow configured to run when push events occur.

Checks will run for any commits added to the release branch, just not for the initial PR.

A short-term manual workaround for this is to make the PR a draft, then mark it "ready to review". This triggers the ready_for_review activity type, which is a trigger for our CI checks workflow. I just did this for the release candidate PR

An automated workaround is to create a personal access token (PAT) from our bot account digidem, with restricted permissions for creating pull requests, and use this as the token for the API request. Some more details about this problem and other solutions is documented here.

This is not an issue for the optic release automation that we use because that action is linked to a Github App, and apps have elevated permissions that allows PRs to trigger workflow runs.

gmaclennan added a commit that referenced this issue Sep 9, 2024
Fixes #662

This switches the github token used to create a pull request for a release candidate to use a token from a GitHub App that I have created for Awana Digital called "Awana PR Bot".

The reason for this change is so that PR checks run when the PR is opened by the [`create-release-candidate.yml`](.github/workflows/create-release-candidate.yml) workflow. Without this change, workflows are not triggered by the PR being opened.
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 a pull request may close this issue.

1 participant