Skip to content

Commit 87d1a72

Browse files
authored
Check precondition in CI on PRs only (#1185)
1 parent 0553d16 commit 87d1a72

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ jobs:
88
check:
99
name: "Check preconditions"
1010
runs-on: ubuntu-latest
11+
if: github.event_name == 'pull_request'
1112
steps:
1213
- uses: actions/[email protected]
1314
- name: "Check that author is present in the NOTICE file"
@@ -23,8 +24,7 @@ jobs:
2324
else
2425
printf "\nOK: Author is present in the NOTICE file.\n";
2526
fi
26-
- name: "If a PR, check that distribution files are unmodified"
27-
if: github.event_name == 'pull_request'
27+
- name: "Check that distribution files are unmodified"
2828
run: |
2929
if git --no-pager diff --name-only $(git rev-parse origin/${{ github.base_ref }})...${{ github.sha }} | grep -q "^dist/"; then
3030
printf "\nThe pull request modifies distribution files, but it shouldn't.\n" &&

0 commit comments

Comments
 (0)