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

CI: Run certain GitHub Actions workflows on official repo only #2951

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

weiji14
Copy link
Member

@weiji14 weiji14 commented Jan 3, 2024

Description of proposed changes

Noticed at seisman#2 that there were a lot of GitHub Actions workflows being ran that might not make sense for forks, so disabling some of them. Specifically:

  • benchmarks.yml
  • check-links.yml
  • ci_docs.yml
  • ci_doctests.yaml
  • ci_tests_legacy.yaml
  • release_drafter.yml

The list above are mostly those that run on the main branch or on a cron schedule, which GitHub should have disabled by default already for new forks according to https://github.com/orgs/community/discussions/26704#discussioncomment-5268498. But we can still explicitly disable them.

The benchmarks.yml one should be disabled, otherwise it will error with a message like this (copied from https://github.com/seisman/pygmt/actions/runs/7403301366/job/20143268291?pr=2):

  Preparing upload...
  Error: error decoding response body: missing field `status` at line 1 column 58
  Error: Process completed with exit code 1.

Fixes #

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
  • If adding new functionality, add an example to docstrings or tutorials.
  • Use underscores (not hyphens) in names of Python files and directories.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

Don't run specific GitHub Actions workflows from forks. Specifically: benchmarks.yml, check-links.yml, ci_docs.yml, ci_doctests.yaml, ci_tests_legacy.yaml, and release_drafter.yml.
@weiji14 weiji14 added the maintenance Boring but important stuff for the core devs label Jan 3, 2024
@weiji14 weiji14 added this to the 0.11.0 milestone Jan 3, 2024
@weiji14 weiji14 self-assigned this Jan 3, 2024
Copy link
Member

@seisman seisman left a comment

Choose a reason for hiding this comment

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

Makes sense to me.

@weiji14 weiji14 marked this pull request as ready for review January 4, 2024 07:35
@weiji14 weiji14 enabled auto-merge (squash) January 4, 2024 07:36
@seisman seisman disabled auto-merge January 4, 2024 07:57
@seisman seisman merged commit e0593d2 into main Jan 4, 2024
22 of 25 checks passed
@seisman seisman deleted the disable-some-gh-actions-on-forks branch January 4, 2024 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Boring but important stuff for the core devs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants