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

Commit

Permalink
Don't fail CI when lint-newfile job was skipped (#10529)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston authored Aug 5, 2021
1 parent a36d77c commit e33f14e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
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.

0 comments on commit e33f14e

Please sign in to comment.