From fb4a0eec404ae516c273e62087378ead6b2851a2 Mon Sep 17 00:00:00 2001 From: Sagnac <83491030+Sagnac@users.noreply.github.com> Date: Wed, 23 Oct 2024 03:08:02 +0000 Subject: [PATCH] CI: skip duplicate jobs across branches, don't run on tag pushes --- .github/workflows/ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae66477..1ffd454 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,8 @@ name: Test on: push: + branches: + - '**' pull_request: workflow_dispatch: @@ -14,7 +16,19 @@ permissions: contents: read jobs: + pre_job: + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@v5 + with: + concurrent_skipping: 'same_content_newer' + do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' test: + needs: pre_job + if: needs.pre_job.outputs.should_skip != 'true' name: ${{ matrix.version == '1' && 'stable' || matrix.version }} - ${{ github.event_name }} runs-on: ubuntu-latest timeout-minutes: 60