forked from haskell/cabal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request haskell#10371 from geekosaur/sdist-whoopsie
add missing sdist skip job
- Loading branch information
Showing
2 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Check sdist Skip | ||
|
||
# This Workflow is special and contains a workaround for a known limitation of GitHub CI. | ||
# | ||
# The problem: We don't want to run the "check sdist" jobs on PRs which contain only changes | ||
# to the docs, since these jobs take a long time to complete without providing any benefit. | ||
# We therefore use path-filtering in the workflow triggers for the check sdist jobs, namely | ||
# "paths-ignore: doc/**". But the "Check sdist post job" is a required job, therefore a PR cannot | ||
# be merged unless the "Bootstrap post job" completes succesfully, which it doesn't do if we | ||
# filter it out. | ||
# | ||
# The solution: We use a second job with the same name which always returns the exit code 0. | ||
# The logic implemented for "required" workflows accepts if 1) at least one job with that name | ||
# runs through, AND 2) If multiple jobs of that name exist, then all jobs of that name have to | ||
# finish successfully. | ||
on: | ||
push: | ||
paths: | ||
- 'doc/**' | ||
- '**/README.md' | ||
- 'CONTRIBUTING.md' | ||
- "changelog.d/**" | ||
# only top level for these, because various test packages have them too | ||
- "*/ChangeLog.md" | ||
- "*/changelog.md" | ||
- "release-notes/**" | ||
branches: | ||
- master | ||
pull_request: | ||
paths: | ||
- 'doc/**' | ||
- '**/README.md' | ||
- 'CONTRIBUTING.md' | ||
- "changelog.d/**" | ||
- "*/ChangeLog.md" | ||
- "*/changelog.md" | ||
- "release-notes/**" | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
check-sdist-post-job: | ||
if: always() | ||
name: Check sdist post job | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters