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

Add authorize job which requires externally created PRs to be approve… #883

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kylewuolle
Copy link
Contributor

This PR enables the concept of approving externally created PRs for running e2e tests. It is based on a blog post : https://datachain.ai/blog/testing-external-contributions-using-github-actions-secrets

The setup involved here is first we create two environments: external and internal. The external environment will have a deployment protection rule enabled which will require a review from anyone on the team. This PR introduces a job called "authorize" which only runs after approval if the PR originates from a fork. Then, the e2e test jobs are marked as needing the authorize job to complete prior to running. In this way users on the team can still run e2e tests from either forked or unforked PRs since we can approve the job.

Here is an example of the protection in action:
vokoscreen-2025-01-10_09-52-32

Here's an example of a PR which is not forked:
vokoscreen-2025-01-10_10-06-37

For forked PRs from team members the flow will be the same as the first example but we can self approve the job run.

Resolves https://github.com/k0rdent/2a-internal/issues/17

…d while allowing internal team members to run tests without approval
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant