diff --git a/.github/workflows/on_pr_opened.yaml b/.github/workflows/on_pr_opened.yaml index 979313871..567a9418f 100644 --- a/.github/workflows/on_pr_opened.yaml +++ b/.github/workflows/on_pr_opened.yaml @@ -19,10 +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 }} + if: "! github.event.pull_request.head.repo.fork" runs-on: ubuntu-latest timeout-minutes: 10 steps: @@ -37,12 +34,12 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} app_title: Common Hosted Forms - PR-${{ github.event.number }} route_path: /pr-${{ github.event.number }} - app_contact: ${{ secrets.VITE_CONTACT }} + app_contact: ${{ vars.CHEFS_CONTACT }} deploy-pr-dev: name: Deploy Pull Request to Dev environment: - name: pr-external + name: pr url: https://${{ env.ACRONYM }}-dev.apps.silver.devops.gov.bc.ca/pr-${{ github.event.number }} runs-on: ubuntu-latest needs: build @@ -70,4 +67,4 @@ jobs: with: header: release message: | - Release ${{ github.sha }} deployed at + Release ${{ github.sha }} deployed at \ No newline at end of file diff --git a/.github/workflows/on_pr_opened_collaborator.yaml b/.github/workflows/on_pr_opened_collaborator.yaml deleted file mode 100644 index a58db844c..000000000 --- a/.github/workflows/on_pr_opened_collaborator.yaml +++ /dev/null @@ -1,73 +0,0 @@ -name: Pull Request Opened Collaborator - -env: - ACRONYM: chefs - -on: - pull_request: - branches: - - main - types: - - opened - - reopened - - synchronize - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -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: - - name: Checkout - uses: actions/checkout@v3 - - name: Build & Push - uses: ./.github/actions/build-push-container - with: - context: . - image_name: ${{ vars.APP_NAME }} - github_username: ${{ github.repository_owner }} - github_token: ${{ secrets.GITHUB_TOKEN }} - app_title: Common Hosted Forms - PR-${{ github.event.number }} - route_path: /pr-${{ github.event.number }} - app_contact: ${{ secrets.VITE_CONTACT }} - - deploy-pr-dev: - name: Deploy Pull Request to Dev - environment: - name: pr - url: https://${{ env.ACRONYM }}-dev.apps.silver.devops.gov.bc.ca/pr-${{ github.event.number }} - runs-on: ubuntu-latest - needs: build - timeout-minutes: 12 - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Deploy to Dev - uses: ./.github/actions/deploy-to-environment - with: - app_name: ${{ vars.APP_NAME }} - acronym: ${{ env.ACRONYM }} - environment: pr - job_name: pr-${{ github.event.number }} - namespace_prefix: ${{ vars.NAMESPACE_PREFIX }} - namespace_environment: dev - openshift_server: ${{ secrets.OPENSHIFT_SERVER }} - openshift_token: ${{ secrets.OPENSHIFT_TOKEN }} - server_host: ${{ vars.SERVER_HOST }} - route_path: /pr-${{ github.event.number }} - route_prefix: ${{ vars.ROUTE_PREFIX }} - - name: Release Comment on PR - uses: marocchino/sticky-pull-request-comment@v2 - if: success() - with: - header: release - message: | - Release ${{ github.sha }} deployed at