feat(auth): role-gated route guards + no-access screen (Story 1.3) #671
Workflow file for this run
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: PR Validate | |
| on: | |
| pull_request: | |
| types: [edited, opened, synchronize, reopened, ready_for_review] | |
| concurrency: | |
| group: ${{ github.workflow }}-edit-${{ github.event.number }} | |
| cancel-in-progress: true | |
| permissions: {} | |
| jobs: | |
| # ZONE for OpenShift objects is the PR number mapped into 0-49 (see | |
| # pr-open.yml), so the deployment links must use that zone. | |
| init: | |
| name: Initialize | |
| if: (! github.event.pull_request.draft) | |
| runs-on: ubuntu-slim | |
| timeout-minutes: 1 | |
| outputs: | |
| zone: ${{ steps.zone.outputs.zone }} | |
| steps: | |
| - id: zone | |
| run: echo "zone=$(( ${{ github.event.number }} % 50 ))" >> $GITHUB_OUTPUT | |
| validate: | |
| name: Validate PR | |
| needs: [init] | |
| permissions: | |
| pull-requests: write | |
| uses: bcgov/quickstart-openshift-helpers/.github/workflows/.pr-validate.yml@a11ad3d1b9288fb40757c4314a62eb86ff227931 # v1.2.1 | |
| with: | |
| markdown_links: | | |
| - [Frontend](https://${{ github.event.repository.name }}-${{ needs.init.outputs.zone }}.${{ vars.OPENSHIFT_APPS_DOMAIN || 'apps.gold.devops.gov.bc.ca' }}) | |
| - [Backend](https://${{ github.event.repository.name }}-${{ needs.init.outputs.zone }}.${{ vars.OPENSHIFT_APPS_DOMAIN || 'apps.gold.devops.gov.bc.ca' }}/api/health) | |
| results: | |
| name: Validate Results | |
| if: always() | |
| needs: [validate] | |
| runs-on: ubuntu-slim | |
| steps: | |
| - run: echo "Success!" |