From 7f74805f0f3119c4e94d8820841136eac0d6c039 Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 25 Mar 2020 03:06:04 +0100 Subject: [PATCH] Check precondition in CI on PRs only --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d53b33e01..b4a0b3f74b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,7 @@ jobs: check: name: "Check preconditions" runs-on: ubuntu-latest + if: github.event_name == 'pull_request' steps: - uses: actions/checkout@v1.0.0 - name: "Check that author is present in the NOTICE file" @@ -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" &&