-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Streamline testing with all secrets #12817
Conversation
I tested this on my fork:
|
@ppalucha Do you want to review this? |
37e1879
to
7ed039a
Compare
fd4e839
to
0444e46
Compare
0b1294a
to
b8a2695
Compare
@hashhar Do you know when it can land? |
}); | ||
return result; | ||
} | ||
const { data: result } = await github.rest.checks.create({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it mean that there are checks that are created only once they finish? If that's the case then maybe it's worth creating them first, just to indicate that something is still in progress.
b8a2695
to
c917313
Compare
c917313
to
cc2491c
Compare
76b3d33
to
c25d13e
Compare
@nineinchnick Could you please address conflicts? |
I can't resolve conflicts until trinodb/github-actions#15 gets merged |
c25d13e
to
01c5ba6
Compare
01c5ba6
to
443c094
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I'm merging this @nineinchnick - thanks for the work here.
FYI @trinodb/maintainers you can now try to "approve" a commit from a fork to run CI with secrets once you have verified it looks ok to test.
Also since I have limited availability please keep an eye open for some time if this runs into issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
443c094
to
bb0902d
Compare
Description
Streamline running tests with all secrets for approved commits.
This is based on https://github.com/imjohnbo/ok-to-test
The suggested workflow is:
/test-with-secrets sha=<last-commit-sha>
test-with-secrets-command
in the actions tabImplementation details - why this is secure:
/test-with-secrets
command has write permissions; this workflow needs to have elevated permissions on its own and should authenticate as an app; it needs the app to be installed in the repo andAPP_ID
andAPP_PRIVATE_KEY
secrets to be definedrepository_dispatch
event that'll trigger the CI in the repo context with access to all secrets; the approved SHA is passed as a param to be checked out from the forkworkflow_dispatch
can't be used because it can't be limited only to people with write accessEvery PR commit needs to be checked, but the workflow runs in about 5 seconds per comment and here's the avg and max per day for the last few months:
gives:
Related issues, pull requests, and links
Documentation
(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
(x) No release notes entries required.
( ) Release notes entries required with the following suggested text: