From 731ffc1310b161899ce2e5892d0846f0d7c6aa68 Mon Sep 17 00:00:00 2001 From: jasonchung1871 <101672465+jasonchung1871@users.noreply.github.com> Date: Tue, 30 Jan 2024 11:24:18 -0800 Subject: [PATCH] minor changes to workflow (#1262) prevents non collaborator workflow from running when a pull request is created by a collaborator. adds the environment to the collaborator workflow, this might fix the build issue. --- .github/workflows/on_pr_opened.yaml | 1 + .github/workflows/on_pr_opened_collaborator.yaml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/on_pr_opened.yaml b/.github/workflows/on_pr_opened.yaml index 3513a5a5e..979313871 100644 --- a/.github/workflows/on_pr_opened.yaml +++ b/.github/workflows/on_pr_opened.yaml @@ -19,6 +19,7 @@ concurrency: jobs: build: name: Build & Push + if: "github.event.pull_request.author_association != 'COLLABORATOR' && github.event.review.author_association != 'OWNER'" environment: name: pr-external url: https://${{ env.ACRONYM }}-dev.apps.silver.devops.gov.bc.ca/pr-${{ github.event.number }} diff --git a/.github/workflows/on_pr_opened_collaborator.yaml b/.github/workflows/on_pr_opened_collaborator.yaml index 10f6c8a44..a58db844c 100644 --- a/.github/workflows/on_pr_opened_collaborator.yaml +++ b/.github/workflows/on_pr_opened_collaborator.yaml @@ -20,6 +20,9 @@ jobs: build: name: Build & Push if: "github.event.pull_request.author_association == 'COLLABORATOR' || github.event.review.author_association == 'OWNER'" + environment: + name: pr + url: https://${{ env.ACRONYM }}-dev.apps.silver.devops.gov.bc.ca/pr-${{ github.event.number }} runs-on: ubuntu-latest timeout-minutes: 10 steps: