From bdea3fb39551b4c8c5bf83378f8a14e36e3c170e Mon Sep 17 00:00:00 2001 From: sciencefidelity <32623301+sciencefidelity@users.noreply.github.com> Date: Mon, 21 Aug 2023 23:02:05 +0100 Subject: [PATCH] ci: change to pull request target --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3dc3122..9343377 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,8 +34,8 @@ jobs: - name: test 2 run: | - echo ${{ (github.event.pull_request.merged != false && github.head_ref == 'main') && 'production' || 'staging' }} - echo ${{ (github.event.pull_request.merged != false && github.head_ref == 'main') && '' || '--tag beta' }} + echo ${{ (github.event.pull_request.merged == true && github.ref_name == 'main') && 'production' || 'staging' }} + echo ${{ (github.event.pull_request.merged == true && github.ref_name == 'main') && '' || '--tag beta' }} - name: test 3 run: | @@ -43,5 +43,5 @@ jobs: echo ${{ env.PACKAGE_TAG }} echo ${{ env.GITHUB_BRANCH }} env: - MATT_ENV: ${{ (github.event.pull_request.merged != false && env.GITHUB_BRANCH == 'main') && 'production' || 'staging' }} - PACKAGE_TAG: ${{ (github.event.pull_request.merged != false && env.GITHUB_BRANCH == 'main') && '' || '--tag beta' }} + MATT_ENV: ${{ (github.event.pull_request.merged == true && github.ref_name == 'main') && 'production' || 'staging' }} + PACKAGE_TAG: ${{ (github.event.pull_request.merged == true && github.ref_name == 'main') && '' || '--tag beta' }}