From b949564178ae08dac3f62d5bdd7f44025525077b Mon Sep 17 00:00:00 2001 From: Victor Hang Date: Fri, 20 Dec 2024 09:40:55 +0100 Subject: [PATCH] =?UTF-8?q?fix=20=F0=9F=90=9B:=20prevent=20duplicate=20act?= =?UTF-8?q?ions=20job?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Victor Hang --- .github/workflows/build-anya.yaml | 17 +++++++++++++++++ .github/workflows/build-nishinoya.yaml | 17 +++++++++++++++++ .github/workflows/build-totoro.yaml | 17 +++++++++++++++++ 3 files changed, 51 insertions(+) diff --git a/.github/workflows/build-anya.yaml b/.github/workflows/build-anya.yaml index 6a6be1e..66220ec 100644 --- a/.github/workflows/build-anya.yaml +++ b/.github/workflows/build-anya.yaml @@ -7,7 +7,24 @@ on: branches: - main jobs: + pre_job: + # continue-on-error: true # Uncomment once integration is finished + runs-on: ubuntu-latest + # Map a step output to a job output + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + # All of these options are optional, so you can remove them if you are happy with the defaults + concurrent_skipping: 'never' + skip_after_successful_duplicate: 'true' + paths_ignore: '["**/README.md", "**/docs/**"]' + do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' build: + needs: pre_job + if: ${{ needs.pre_job.outputs.should_skip != 'true' }} runs-on: ubuntu-latest steps: - name: Free Disk Space (Ubuntu) diff --git a/.github/workflows/build-nishinoya.yaml b/.github/workflows/build-nishinoya.yaml index f8b985d..e0feea5 100644 --- a/.github/workflows/build-nishinoya.yaml +++ b/.github/workflows/build-nishinoya.yaml @@ -7,7 +7,24 @@ on: branches: - main jobs: + pre_job: + # continue-on-error: true # Uncomment once integration is finished + runs-on: ubuntu-latest + # Map a step output to a job output + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + # All of these options are optional, so you can remove them if you are happy with the defaults + concurrent_skipping: 'never' + skip_after_successful_duplicate: 'true' + paths_ignore: '["**/README.md", "**/docs/**"]' + do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' build: + needs: pre_job + if: ${{ needs.pre_job.outputs.should_skip != 'true' }} runs-on: ubuntu-latest steps: - name: Free Disk Space (Ubuntu) diff --git a/.github/workflows/build-totoro.yaml b/.github/workflows/build-totoro.yaml index a64ae3f..633ce7e 100644 --- a/.github/workflows/build-totoro.yaml +++ b/.github/workflows/build-totoro.yaml @@ -7,7 +7,24 @@ on: branches: - main jobs: + pre_job: + # continue-on-error: true # Uncomment once integration is finished + runs-on: ubuntu-latest + # Map a step output to a job output + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + # All of these options are optional, so you can remove them if you are happy with the defaults + concurrent_skipping: 'never' + skip_after_successful_duplicate: 'true' + paths_ignore: '["**/README.md", "**/docs/**"]' + do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' build: + needs: pre_job + if: ${{ needs.pre_job.outputs.should_skip != 'true' }} runs-on: ubuntu-latest steps: - name: Free Disk Space (Ubuntu)