-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to run integration tests from PRs from forks (#167)
With our [first community PR](#161) (馃帀 ), there was an issue that the integration tests for the PR did not run since they could not access the API token for the test user from the repo secrets. This changes the check workflows so that the tests run on the `pull_request_target` event, not on the `pull_request` event, which allows passing the secrets to the workflow even in case of forks. To prevent leaking the secrets, running the workflows on a PR from a fork requires approving the workflow run by a maintainer via an environment protection rule. I've put @vdusek, @janbuchar, @jirimoravcik and me as maintainers of that environment, so that we get notified in case of a fork PR and can approve the workflow runs. The `pull_request_target` event runs in the context of the PR base branch, not the head branch, for security reasons, so to run the tests against the PR code, we have to check it out explicitly instead of checking out the default ref.
- Loading branch information
Showing
6 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters