fix(ci): introduce pr validate/edit workflow #3902
Workflow file for this run
This file contains 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 | |
on: | |
pull_request: | |
merge_group: | |
concurrency: | |
# Cancel in progress for PR open and close, but not merge_group | |
group: ${{ github.workflow }}-${{ github.event.number || github.event.merge_group.base_sha }} | |
cancel-in-progress: true | |
jobs: | |
# Find initial PR number (for merge queues) | |
vars: | |
name: Set Variables | |
outputs: | |
pr: ${{ steps.pr.outputs.pr }} | |
runs-on: ubuntu-22.04 | |
steps: | |
# Get PR number for merge queues, otherwise use github.event.number | |
- name: PR Number | |
id: pr | |
uses: bcgov-nr/[email protected] | |
# https://github.com/bcgov-nr/action-builder-ghcr | |
builds: | |
name: Builds | |
needs: [vars] | |
runs-on: ubuntu-22.04 | |
permissions: | |
packages: write | |
strategy: | |
matrix: | |
package: [migrations, backend, frontend] | |
timeout-minutes: 10 | |
steps: | |
- uses: bcgov-nr/[email protected] | |
with: | |
keep_versions: 50 | |
package: ${{ matrix.package }} | |
tag: ${{ needs.vars.outputs.pr }} | |
tag_fallback: latest | |
triggers: ('${{ matrix.package }}/') | |
# https://github.com/bcgov-nr/action-deployer-openshift | |
deploys: | |
name: Deploys | |
needs: [builds, vars] | |
uses: ./.github/workflows/.deploy.yml | |
secrets: inherit | |
with: | |
autoscaling: false | |
directory: charts/quickstart-openshift | |
tag: ${{ needs.vars.outputs.pr }} | |
release: ${{ needs.vars.outputs.pr }} | |
triggers: ('backend/' 'frontend/' 'migrations/' 'charts/') |