Skip to content

Run cron workflows only on the main repo - #11056

Merged
pllim merged 1 commit into
astropy:masterfrom
saimn:actions-cron
Nov 18, 2020
Merged

pllim merged 1 commit into
astropy:masterfrom
saimn:actions-cron

Conversation

@saimn

@saimn saimn commented Nov 18, 2020 •

Copy link
Copy Markdown
Contributor

To avoid running cron jobs on forks (see discussion in #11054 (comment)).

edit: I canceled the normal workflow since it is not affected by this.

@pllim pllim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! We can certainly give this a try.

Do we also want to limit the runs only to master branch?

The quotes look a little weird, so I suggested changes.

Comment thread .github/workflows/ci_cron.yml Resolved
Comment thread .github/workflows/ci_cron_weekly.yml Resolved
@saimn

saimn commented Nov 18, 2020

Copy link
Copy Markdown
Contributor Author

Do we also want to limit the runs only to master branch?

Those workflows run only on cron event, so only for master.

The quotes look a little weird, so I suggested changes.

Good catch, thanks (the problem of copy/pasting from the internet :P)

@pllim pllim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Might wanna squash the commits. 😜

Those workflows run only on cron event, so only for master.

If we start to have this cron YAML in release branches, will cron run for those too? Do we want it to?

@astrofrog

Copy link
Copy Markdown
Member

In the past I think we do run the cron jobs in releases branches but as regular jobs not cron?

@pllim

pllim commented Nov 18, 2020

Copy link
Copy Markdown
Member

but as regular jobs not cron?

How is that possible? You customized the .travis.yml in release branches?

@saimn

saimn commented Nov 18, 2020

Copy link
Copy Markdown
Contributor Author

Actually I think the workflow will run on the branch where it is triggered, so it should work for any branch.

@mhvk

mhvk commented Nov 18, 2020

Copy link
Copy Markdown
Contributor

Once this is in, it may be good to send a message to astropy-dev to tell people to pull upstream and push to their own fork, so that the auto-runs stop.

Does this affect those that followed recommendations and changed the name master to placeholder?

@pllim pllim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am just going to get this in now, as all the other conversations are more for a follow-up and do not block this patch. Thanks!

@pllim
pllim merged commit a995665 into astropy:master Nov 18, 2020
@pllim

pllim commented Nov 18, 2020

Copy link
Copy Markdown
Member

xref #11038 #10388

@saimn
saimn deleted the actions-cron branch November 18, 2020 20:49
@saimn

saimn commented Nov 18, 2020

Copy link
Copy Markdown
Contributor Author

I don't think many people keep their master branch in sync with the main repo, so it should not be a problem for existing forks.
It would mostly be a problem for future forks.

@mhvk

mhvk commented Nov 18, 2020

Copy link
Copy Markdown
Contributor

True, probably unnecessary to warn people given how short a period this can have been a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants