From: Tobias Brunner Date: Fri, 11 Dec 2020 15:30:04 +0000 (+0100) Subject: github: Prevent duplicate CI runs X-Git-Tag: 5.9.2dr1~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8468b43891f01f2502d7b93c7ef08534b7d139cd;p=thirdparty%2Fstrongswan.git github: Prevent duplicate CI runs This cancels previous runs of the same branch and skips runs of the same content (e.g. after merges or tags). --- diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 567c50772e..b4f1bace00 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -10,7 +10,19 @@ env: OS_NAME: linux jobs: + pre-check: + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip-check.outputs.should_skip }} + steps: + - id: skip-check + uses: fkirc/skip-duplicate-actions@master + with: + concurrent_skipping: 'same_content' + android: + needs: pre-check + if: ${{ needs.pre-check.outputs.should_skip != 'true' }} runs-on: ubuntu-latest env: TEST: android diff --git a/.github/workflows/lgtm.yml b/.github/workflows/lgtm.yml index 8d6fd54a01..f527b29664 100644 --- a/.github/workflows/lgtm.yml +++ b/.github/workflows/lgtm.yml @@ -6,7 +6,19 @@ env: OS_NAME: linux jobs: + pre-check: + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip-check.outputs.should_skip }} + steps: + - id: skip-check + uses: fkirc/skip-duplicate-actions@master + with: + concurrent_skipping: 'same_content' + lgtm: + needs: pre-check + if: ${{ needs.pre-check.outputs.should_skip != 'true' }} runs-on: ubuntu-latest env: TEST: lgtm diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index fc51cd35c7..442628b7b5 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -13,7 +13,19 @@ env: OS_NAME: linux jobs: + pre-check: + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip-check.outputs.should_skip }} + steps: + - id: skip-check + uses: fkirc/skip-duplicate-actions@master + with: + concurrent_skipping: 'same_content' + latest: + needs: pre-check + if: ${{ needs.pre-check.outputs.should_skip != 'true' }} runs-on: ubuntu-latest strategy: matrix: @@ -72,6 +84,8 @@ jobs: retention-days: 5 crypto-plugins: + needs: pre-check + if: ${{ needs.pre-check.outputs.should_skip != 'true' }} runs-on: ubuntu-latest strategy: matrix: @@ -108,6 +122,8 @@ jobs: retention-days: 5 xenial: + needs: pre-check + if: ${{ needs.pre-check.outputs.should_skip != 'true' }} runs-on: ubuntu-16.04 strategy: matrix: diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 1528f3f9e3..c89678a558 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -10,7 +10,19 @@ env: OS_NAME: macos jobs: + pre-check: + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip-check.outputs.should_skip }} + steps: + - id: skip-check + uses: fkirc/skip-duplicate-actions@master + with: + concurrent_skipping: 'same_content' + macos: + needs: pre-check + if: ${{ needs.pre-check.outputs.should_skip != 'true' }} runs-on: macos-latest env: TEST: macos diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index aa6a411e2c..293cbe27d0 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -9,7 +9,19 @@ env: OS_NAME: linux jobs: + pre-check: + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip-check.outputs.should_skip }} + steps: + - id: skip-check + uses: fkirc/skip-duplicate-actions@master + with: + concurrent_skipping: 'same_content' + sonarcloud: + needs: pre-check + if: ${{ needs.pre-check.outputs.should_skip != 'true' }} runs-on: ubuntu-latest env: TEST: sonarcloud diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 073bd274ad..31334c504a 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -13,7 +13,19 @@ env: MONOLITHIC: yes jobs: + pre-check: + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip-check.outputs.should_skip }} + steps: + - id: skip-check + uses: fkirc/skip-duplicate-actions@master + with: + concurrent_skipping: 'same_content' + cross-compile: + needs: pre-check + if: ${{ needs.pre-check.outputs.should_skip != 'true' }} runs-on: ubuntu-latest strategy: matrix: