Skip to content

Merge to Main

Merge to Main #84

Workflow file for this run

name: Merge to Main
on:
workflow_run:
workflows: [ "Pull Request Closed" ]
types:
- completed
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
codeql:
name: Semantic Code Analysis
runs-on: ubuntu-22.04
permissions:
actions: read
contents: read
security-events: write
steps:
- uses: actions/checkout@v4
- name: Initialize
uses: github/codeql-action/init@v2
with:
languages: javascript
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
deploys-test:
name: TEST Deployments
environment: test
runs-on: ubuntu-22.04
permissions:
issues: write
steps:
- uses: bcgov-nr/[email protected]
with:
file: frontend/openshift.deploy.yml
oc_namespace: ${{ vars.OC_NAMESPACE }}
oc_server: ${{ vars.OC_SERVER }}
oc_token: ${{ secrets.OC_TOKEN }}
overwrite: true
parameters:
-p ZONE=test -p PROMOTE=${{ github.repository }}/frontend:test
-p NAME=${{ github.event.repository.name }}
-p VITE_USER_POOLS_ID=${{ vars.VITE_USER_POOLS_ID }}
-p VITE_USER_POOLS_WEB_CLIENT_ID=${{ vars.VITE_USER_POOLS_WEB_CLIENT_ID }}
penetration_test: true
penetration_test_artifact: frontend
penetration_test_issue: frontend
penetration_test_token: ${{ secrets.GITHUB_SECRET }}
deploys-prod:
name: PROD Deployments
needs:
- deploys-test
environment: prod
runs-on: ubuntu-22.04
steps:
- uses: bcgov-nr/[email protected]
with:
file: frontend/openshift.deploy.yml
oc_namespace: ${{ vars.OC_NAMESPACE }}
oc_server: ${{ vars.OC_SERVER }}
oc_token: ${{ secrets.OC_TOKEN }}
overwrite: true
parameters:
-p ZONE=prod -p PROMOTE=${{ github.repository }}/frontend:test
-p NAME=${{ github.event.repository.name }}
-p VITE_USER_POOLS_ID=${{ vars.VITE_USER_POOLS_ID }}
-p VITE_USER_POOLS_WEB_CLIENT_ID=${{ vars.VITE_USER_POOLS_WEB_CLIENT_ID }}
-p VITE_REDIRECT_SIGN_OUT="${{ vars.VITE_REDIRECT_SIGN_OUT }}"
image-promotions:
name: Promote images to PROD
needs:
- deploys-prod
runs-on: ubuntu-22.04
permissions:
packages: write
steps:
- uses: shrink/actions-docker-registry-tag@v3
with:
registry: ghcr.io
repository: ${{ github.repository }}/frontend
target: test
tags: prod