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

Only run publish workflow on main monaco-editor repo #2926

Merged
merged 2 commits into from
Feb 2, 2022

Conversation

MasterOdin
Copy link
Contributor

@MasterOdin MasterOdin commented Jan 30, 2022

Currently, the publish workflow will automatically run in any fork of the main repo, triggering an action failure once a week.

This PR adjusts the workflow so that it'll check if it's running in the main repo before attempting to run the job, so it'll continue to work the same in the main repo, and just not run at all in forks.

This could also be applied to the other workflows that run on cron jobs if desired.

Copy link
Member

@hediet hediet left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@hediet hediet merged commit 4c068a7 into microsoft:main Feb 2, 2022
@hediet hediet added this to the January 2022 milestone Feb 2, 2022
@hediet
Copy link
Member

hediet commented Feb 3, 2022

Hmm, the syntax seems to be different. I should have checked that.
https://github.com/microsoft/monaco-editor/actions/runs/1788088945/workflow

@MasterOdin MasterOdin deleted the bugfix-workflow-publish branch February 3, 2022 15:10
@MasterOdin
Copy link
Contributor Author

MasterOdin commented Feb 3, 2022

Welp, I failed to realize that the single quotes from the example docs (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-only-run-job-for-specific-repository) was significant I guess? Or the example is broken as well. 🤷

@github-actions github-actions bot locked and limited conversation to collaborators Mar 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants