From 463994df1f2ab019f02cb2e5d57bd0d59c801c06 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Wed, 5 Jul 2023 09:24:46 +0200 Subject: [PATCH] Fix CI --- .github/workflows/ci-chromatic.yaml | 6 ++++++ .github/workflows/ci-docs.yaml | 5 +++++ .github/workflows/ci-front.yaml | 5 +++++ 3 files changed, 16 insertions(+) diff --git a/.github/workflows/ci-chromatic.yaml b/.github/workflows/ci-chromatic.yaml index 043067989..e0ddc2462 100644 --- a/.github/workflows/ci-chromatic.yaml +++ b/.github/workflows/ci-chromatic.yaml @@ -13,9 +13,15 @@ jobs: REACT_APP_AUTH_URL: http://127.0.0.1:3000/auth steps: - uses: actions/checkout@v3 + if: github.event_name == 'push' with: fetch-depth: 0 ref: ${{ github.head_ref || github.ref_name }} + - uses: actions/checkout@v3 + if: github.event_name == 'pull_request_target' + with: + fetch-depth: 0 + ref: "refs/pull/${{ github.event.number }}/merge" - name: Setup Node.js uses: actions/setup-node@v3 with: diff --git a/.github/workflows/ci-docs.yaml b/.github/workflows/ci-docs.yaml index de7dddd88..13b31ea9c 100644 --- a/.github/workflows/ci-docs.yaml +++ b/.github/workflows/ci-docs.yaml @@ -9,8 +9,13 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + if: github.event_name == 'push' with: ref: ${{ github.head_ref || github.ref_name }} + - uses: actions/checkout@v3 + if: github.event_name == 'pull_request_target' + with: + ref: "refs/pull/${{ github.event.number }}/merge" - name: Setup Node.js uses: actions/setup-node@v3 with: diff --git a/.github/workflows/ci-front.yaml b/.github/workflows/ci-front.yaml index 6708b74d8..480036076 100644 --- a/.github/workflows/ci-front.yaml +++ b/.github/workflows/ci-front.yaml @@ -12,8 +12,13 @@ jobs: REACT_APP_AUTH_URL: http://127.0.0.1:3000/auth steps: - uses: actions/checkout@v3 + if: github.event_name == 'push' with: ref: ${{ github.head_ref || github.ref_name }} + - uses: actions/checkout@v3 + if: github.event_name == 'pull_request_target' + with: + ref: "refs/pull/${{ github.event.number }}/merge" - name: Setup Node.js uses: actions/setup-node@v3 with: