From b1fecd00bd4bc1636f2432ce4dabb5372e4a03cb Mon Sep 17 00:00:00 2001 From: Vinayak Kulkarni Date: Thu, 19 Aug 2021 18:16:31 +0530 Subject: [PATCH] fix: update CI workflow --- .github/workflows/ci.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94da45ec..34de1d8a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,18 +10,32 @@ on: - main - next +permissions: + checks: write + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} + cancel-in-progress: true + jobs: ci: runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: [ubuntu-latest] node: [16] steps: - - name: Checkout latest code - uses: actions/checkout@master + - name: Check out repository (push) + if: ${{ github.event_name == 'push' || github.event_name == 'pull_request_target' || github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' }} + uses: actions/checkout@v2 + + - name: Check out repository (pull_request_target) + if: ${{ github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]' }} + uses: actions/checkout@v2 with: ref: ${{ github.event.pull_request.head.sha }}