Skip to content

Check precondition in CI on PRs only #1185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 25, 2020
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
check:
name: "Check preconditions"
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/[email protected]
- name: "Check that author is present in the NOTICE file"
Expand All @@ -23,8 +24,7 @@ jobs:
else
printf "\nOK: Author is present in the NOTICE file.\n";
fi
- name: "If a PR, check that distribution files are unmodified"
if: github.event_name == 'pull_request'
- name: "Check that distribution files are unmodified"
run: |
if git --no-pager diff --name-only $(git rev-parse origin/${{ github.base_ref }})...${{ github.sha }} | grep -q "^dist/"; then
printf "\nThe pull request modifies distribution files, but it shouldn't.\n" &&
Expand Down