Skip to content

Commit

Permalink
Skip workflows if only non-source-code files are changed (GenericMapp…
Browse files Browse the repository at this point in the history
…ingTools#839)

Skip workflows in PRs if **ONLY** the following are changed:

```
- 'doc/**'
- '*.md'
- '*.json'
- 'README.rst'
- 'LICENSE.txt'
```

Any other changes (especially changes in `pygmt/` and `examples/`) still trigger the workflows.

**Notes:**

- `examples/` directory is not excluded because some examples may pass on one OS but fail on another one.
- the workflow is always triggered in the master branch even though only plaintext files are changed

Fixes GenericMappingTools#837.

Reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpaths
  • Loading branch information
seisman authored and Josh Sixsmith committed Dec 21, 2022
1 parent 3f281e7 commit a6324b9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ on:
push:
branches: [ master ]
pull_request:
paths-ignore:
- 'doc/**'
- '*.md'
- '*.json'
- 'README.rst'
- 'LICENSE.txt'
release:
types:
- published
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ci_tests_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ on:
# branches: [ master ]
pull_request:
types: [ready_for_review]
paths-ignore:
- 'doc/**'
- '*.md'
- '*.json'
- 'README.rst'
- 'LICENSE.txt'
repository_dispatch:
types: [test-gmt-dev-command]
# Schedule daily tests
Expand Down

0 comments on commit a6324b9

Please sign in to comment.