From df0aa1e6c09dcf892a318700e9feac995e4e6673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Gonz=C3=A1lez?= Date: Tue, 25 Jul 2023 20:49:39 +0200 Subject: [PATCH] Do not trigger CI workflow when pushing release tags This is not necessary, and wastes action runs. --- .github/workflows/oxipng.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/oxipng.yml b/.github/workflows/oxipng.yml index 0c49dce1..cbe3cbbc 100644 --- a/.github/workflows/oxipng.yml +++ b/.github/workflows/oxipng.yml @@ -15,8 +15,8 @@ jobs: runs-on: ${{ matrix.os }} timeout-minutes: 60 - # Prevent in-repo PRs from running the same jobs twice - if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork + # Prevent tags and in-repo PRs from triggering this workflow more than once for a commit + if: github.ref_type != 'tag' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork) strategy: fail-fast: false @@ -157,8 +157,8 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 30 - # Prevent in-repo PRs from running the same jobs twice - if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork + # Prevent tags and in-repo PRs from triggering this workflow more than once for a commit + if: github.ref_type != 'tag' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork) steps: - name: Checkout source