From 7e70d8e63c2e2cff7b69550a1afc4fe8d708ea43 Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Wed, 13 May 2020 17:25:18 +0900 Subject: [PATCH] Skip test job for pull requests from forks --- .github/workflows/ci.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 12b5bac..8397269 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,18 +31,16 @@ jobs: path: dist test: + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository needs: [build] runs-on: ubuntu-latest strategy: matrix: target: [built, committed] steps: - - if: github.event_name == 'push' - uses: actions/checkout@v2 - - if: github.event_name == 'pull_request' - uses: actions/checkout@v2 + - uses: actions/checkout@v2 with: - ref: ${{ github.head_ref }} + ref: master - if: matrix.target == 'built' || github.event_name == 'pull_request' uses: actions/download-artifact@v2 with: