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

build: do not run auto-start-ci on forks #34650

Closed

Conversation

evanlucas
Copy link
Contributor

Previously, the auto-start-ci action would run on forks.
Without the secrets, the action would fail over and over again.
This caused a lot of email spam. Now, we only run this action
when the repository is nodejs/node.

/cc @mmarchini I think this should work, although I'm not sure how to test...

Checklist

Previously, the auto-start-ci action would run on forks.
Without the secrets, the action would fail over and over again.
This caused a lot of email spam. Now, we only run this action
when the repository is nodejs/node.
@evanlucas evanlucas requested a review from mmarchini August 6, 2020 16:50
@nodejs-github-bot nodejs-github-bot added the meta Issues and PRs related to the general management of the project. label Aug 6, 2020
@mmarchini
Copy link
Contributor

Can we instead check if the secrets are present, and if not skip the run? I'd like this to still work on forks since sometimes we test this kind of thing on nodejs/node-auto-tools.

@evanlucas
Copy link
Contributor Author

@mmarchini that's a good point. Lemme see what I can do

@@ -13,6 +13,7 @@ on:

jobs:
startCI:
if: github.repository == 'nodejs/node'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if: github.repository == 'nodejs/node'
if: secrets.JENKINS_USER && secrets.JENKINS_TOKEN

Also not sure if it works. Feel free to try on nodejs/node-auto-test first (I can re-enable Actions there, just give me a ping).

Copy link
Contributor

Choose a reason for hiding this comment

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

It might need to be

Suggested change
if: github.repository == 'nodejs/node'
if: ${{ secrets.JENKINS_USER && secrets.JENKINS_TOKEN }}

https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#about-contexts-and-expressions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mmarchini
Copy link
Contributor

@evanlucas I re-enabled Actions on https://github.com/nodejs/node-auto-test. Let's test there first, since the Action is working here it's better if we're sure the changes will work.

@evanlucas
Copy link
Contributor Author

Sounds good. I'll open a PR over there. I think I've found a way to do it

@mmarchini
Copy link
Contributor

FWIW you should be able to test on a personal fork as well, just push the changes to master there :)

Copy link
Contributor

@mmarchini mmarchini left a comment

Choose a reason for hiding this comment

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

Let's move forward with this approach for now, we can't use secrets on conditionals and even with workarounds to check if conditionals exist, cancelling the run will also trigger notifications.

@mmarchini
Copy link
Contributor

fast track?

@richardlau richardlau added the fast-track PRs that do not need to wait for 48 hours to land. label Aug 7, 2020
@mmarchini
Copy link
Contributor

Landed in ac5773b

@mmarchini mmarchini closed this Aug 7, 2020
mmarchini pushed a commit that referenced this pull request Aug 7, 2020
Previously, the auto-start-ci action would run on forks.
Without the secrets, the action would fail over and over again.
This caused a lot of email spam. Now, we only run this action
when the repository is nodejs/node.

PR-URL: #34650
Reviewed-By: Mary Marchini <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
addaleax pushed a commit that referenced this pull request Aug 8, 2020
Previously, the auto-start-ci action would run on forks.
Without the secrets, the action would fail over and over again.
This caused a lot of email spam. Now, we only run this action
when the repository is nodejs/node.

PR-URL: #34650
Reviewed-By: Mary Marchini <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
@codebytere codebytere mentioned this pull request Aug 10, 2020
codebytere pushed a commit that referenced this pull request Aug 11, 2020
Previously, the auto-start-ci action would run on forks.
Without the secrets, the action would fail over and over again.
This caused a lot of email spam. Now, we only run this action
when the repository is nodejs/node.

PR-URL: #34650
Reviewed-By: Mary Marchini <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
addaleax pushed a commit that referenced this pull request Sep 22, 2020
Previously, the auto-start-ci action would run on forks.
Without the secrets, the action would fail over and over again.
This caused a lot of email spam. Now, we only run this action
when the repository is nodejs/node.

PR-URL: #34650
Reviewed-By: Mary Marchini <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
addaleax pushed a commit that referenced this pull request Sep 22, 2020
Previously, the auto-start-ci action would run on forks.
Without the secrets, the action would fail over and over again.
This caused a lot of email spam. Now, we only run this action
when the repository is nodejs/node.

PR-URL: #34650
Reviewed-By: Mary Marchini <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
@codebytere codebytere mentioned this pull request Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fast-track PRs that do not need to wait for 48 hours to land. meta Issues and PRs related to the general management of the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants