From f0c921a131760120ae2f5446ae7ad7b2596c4f72 Mon Sep 17 00:00:00 2001 From: Ivan Gabriele Date: Fri, 6 Sep 2024 10:38:44 +0200 Subject: [PATCH] ci(github): fix release PR exclusion condition --- .github/workflows/check.yml | 6 +++--- .github/workflows/e2e.yml | 10 +++++----- .github/workflows/timezone.yml | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 112d2ba2b..42e745b4f 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -13,7 +13,7 @@ concurrency: jobs: lint: name: Lint - if: ${{ !startsWith(github.ref, 'refs/heads/ci-release-v') }} + if: ${{ !startsWith(github.head_ref, 'ci-release-v') }} runs-on: ubuntu-latest steps: - name: Checkout @@ -33,7 +33,7 @@ jobs: type: name: Type - if: ${{ !startsWith(github.ref, 'refs/heads/ci-release-v') }} + if: ${{ !startsWith(github.head_ref, 'ci-release-v') }} runs-on: ubuntu-latest steps: - name: Checkout @@ -49,7 +49,7 @@ jobs: test_unit: name: Unit Test - if: ${{ !startsWith(github.ref, 'refs/heads/ci-release-v') }} + if: ${{ !startsWith(github.head_ref, 'ci-release-v') }} runs-on: ubuntu-latest steps: - name: Checkout diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index ff475d4ac..178b50c5a 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -21,18 +21,18 @@ jobs: containers: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] steps: - name: Checkout - if: ${{ !startsWith(github.ref, 'refs/heads/ci-release-v') }} + if: ${{ !startsWith(github.head_ref, 'ci-release-v') }} uses: actions/checkout@v4 - name: Setup - if: ${{ !startsWith(github.ref, 'refs/heads/ci-release-v') }} + if: ${{ !startsWith(github.head_ref, 'ci-release-v') }} uses: actions/setup-node@v4 with: node-version: 20 - name: Install - if: ${{ !startsWith(github.ref, 'refs/heads/ci-release-v') }} + if: ${{ !startsWith(github.head_ref, 'ci-release-v') }} uses: ./.github/actions/install - name: Test - if: ${{ !startsWith(github.ref, 'refs/heads/ci-release-v') }} + if: ${{ !startsWith(github.head_ref, 'ci-release-v') }} uses: cypress-io/github-action@v6 with: component: true @@ -48,7 +48,7 @@ jobs: # Release build sanity check with Cypress test_e2e_release: name: Release E2E Test - if: ${{ !startsWith(github.ref, 'refs/heads/ci-release-v') }} + if: ${{ !startsWith(github.head_ref, 'ci-release-v') }} runs-on: ubuntu-latest steps: - name: Checkout diff --git a/.github/workflows/timezone.yml b/.github/workflows/timezone.yml index 9513f7a56..547b434d2 100644 --- a/.github/workflows/timezone.yml +++ b/.github/workflows/timezone.yml @@ -10,7 +10,7 @@ on: jobs: test_unit_in_paris: name: Unit Test - if: ${{ !startsWith(github.ref, 'refs/heads/ci-release-v') }} + if: ${{ !startsWith(github.head_ref, 'ci-release-v') }} strategy: matrix: timeZone: ['Europe/Paris'] @@ -36,7 +36,7 @@ jobs: test_e2e_in_paris: name: E2E Test - if: ${{ !startsWith(github.ref, 'refs/heads/ci-release-v') }} + if: ${{ !startsWith(github.head_ref, 'ci-release-v') }} strategy: matrix: timeZone: ['Europe/Paris']