Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Don't fail CI when a job was skipped #10529

Merged
merged 5 commits into from
Aug 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -374,6 +374,11 @@ jobs:
rc=0
results=$(jq -r 'to_entries[] | [.key,.value.result] | join(" ")' <<< $NEEDS_CONTEXT)
while read job result ; do
# The newsfile lint may be skipped on non PR builds
if [ $result == "skipped" ] && [ $job == "lint-newsfile" ]; then
continue
fi

if [ "$result" != "success" ]; then
echo "::set-failed ::Job $job returned $result"
rc=1
Expand Down
1 change: 1 addition & 0 deletions changelog.d/10529.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix CI to not break when run against branches rather than pull requests.