fix(#2387): fixing security findings in cypress (#2388) #1064
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Merge | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - ".github/ISSUE_TEMPLATE/*" | |
| - "**.md" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }} | |
| cancel-in-progress: true | |
| permissions: {} | |
| jobs: | |
| vars: | |
| name: Set Variables | |
| outputs: | |
| pr: ${{ steps.pr.outputs.pr }} | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 1 | |
| steps: | |
| # Get PR number for squash merges to main | |
| - name: PR Number | |
| id: pr | |
| uses: bcgov/action-get-pr@28b0adf8e4d40720d41f9c87356ce24b0a4bd6af # v0.3.1 | |
| deploy-test: | |
| name: Deploy (TEST) | |
| secrets: inherit | |
| uses: ./.github/workflows/.deploy.yml | |
| with: | |
| environment: test | |
| target: test | |
| url: forestclient-test.apps.silver.devops.gov.bc.ca | |
| configmap-backend: |- | |
| features: | |
| staff: | |
| match: true | |
| info: | |
| app: | |
| component: backend | |
| configmap-frontend: |- | |
| window.localStorage.setItem(\"VITE_FEATURE_FLAGS\",'{}'); | |
| window.localStorage.setItem(\"VITE_LOGOUT_BCSC_URL\",'https://www2.gov.bc.ca/gov/content/industry/natural-resource-use/client-number'); | |
| window.localStorage.setItem(\"VITE_LOGOUT_BCEIDBUSINESS_URL\",'https://www2.gov.bc.ca/gov/content/industry/natural-resource-use/client-number'); | |
| window.localStorage.setItem(\"VITE_LOGOUT_IDIR_URL\",'https://forestclient-test.apps.silver.devops.gov.bc.ca/'); | |
| reporting: | |
| name: SchemaSpy & ZAP | |
| needs: [deploy-test] | |
| permissions: | |
| contents: write | |
| pages: write | |
| issues: write | |
| uses: ./.github/workflows/reporting.yml | |
| deploy-prod: | |
| name: Deploy (PROD) | |
| needs: [deploy-test] | |
| secrets: inherit | |
| uses: ./.github/workflows/.deploy.yml | |
| with: | |
| environment: prod | |
| target: prod | |
| url: forestclient.nrs.gov.bc.ca | |
| configmap-backend: |- | |
| features: | |
| staff: | |
| match: false | |
| info: | |
| app: | |
| component: backend | |
| configmap-frontend: |- | |
| window.localStorage.setItem(\"VITE_FEATURE_FLAGS\",'{}'); | |
| window.localStorage.setItem(\"VITE_LOGOUT_BCSC_URL\",'https://www2.gov.bc.ca/gov/content/industry/natural-resource-use/client-number'); | |
| window.localStorage.setItem(\"VITE_LOGOUT_BCEIDBUSINESS_URL\",'https://www2.gov.bc.ca/gov/content/industry/natural-resource-use/client-number'); | |
| window.localStorage.setItem(\"VITE_LOGOUT_IDIR_URL\",'https://forestclient.nrs.gov.bc.ca/'); | |
| images-prod: | |
| name: Promote images to PROD | |
| needs: [deploy-prod] | |
| permissions: | |
| packages: write | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| component: [backend, frontend, legacy, database, processor] | |
| steps: | |
| - uses: shrink/actions-docker-registry-tag@e6aaef25c595b6e0edd18bf4c7dbfea3abd43299 # v5 | |
| with: | |
| registry: ghcr.io | |
| repository: ${{ github.repository }}/${{ matrix.component }} | |
| target: test | |
| tags: prod | |
| release: | |
| name: Release | |
| needs: [deploy-prod] | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Conventional Changelog Update | |
| uses: TriPSs/conventional-changelog-action@ee43def3241429afddab215ba89090cbf64fb45c # v6 | |
| id: changelog | |
| continue-on-error: true | |
| with: | |
| github-token: ${{ github.token }} | |
| output-file: "CHANGELOG.md" | |
| skip-version-file: "true" | |
| skip-commit: "true" | |
| git-push: "true" | |
| - name: Create Release | |
| uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3 | |
| if: steps.changelog.outputs.tag != '' | |
| continue-on-error: true | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| with: | |
| token: ${{ github.token }} | |
| tag_name: ${{ steps.changelog.outputs.tag }} | |
| name: ${{ steps.changelog.outputs.tag }} | |
| body: ${{ steps.changelog.outputs.clean_changelog }} |