chore(deps): update node dependencies #3668
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 | |
| on: | |
| pull_request: | |
| concurrency: | |
| # PR open and close use the same group, allowing only one at a time | |
| group: pr-${{ github.workflow }}-${{ github.event.number }} | |
| cancel-in-progress: true | |
| permissions: {} | |
| jobs: | |
| builds: | |
| name: Builds | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| attestations: write | |
| id-token: write | |
| packages: write | |
| strategy: | |
| matrix: | |
| package: [backend, backend-postgres, frontend] | |
| include: | |
| - package: backend | |
| build_context: backend | |
| extra_build_arg: PRIMARY_DB=oracle | |
| triggers: ('backend/') | |
| - package: backend-postgres | |
| build_context: backend | |
| extra_build_arg: PRIMARY_DB=postgres | |
| triggers: ('backend/') | |
| - package: frontend | |
| build_context: frontend | |
| extra_build_arg: '' | |
| triggers: ('frontend/') | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: bcgov/action-builder-ghcr@2b24ac7f95e6a019064151498660437cca3202c5 # v4.2.1 | |
| with: | |
| package: ${{ matrix.package }} | |
| build_context: ${{ matrix.build_context }} | |
| build_file: ${{ matrix.build_context }}/Dockerfile | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| triggers: ${{ matrix.triggers }} | |
| tags: ${{ github.event.number }} | |
| tag_fallback: latest | |
| build_args: | | |
| BUILDKIT_INLINE_CACHE=1 | |
| ${{ matrix.extra_build_arg }} | |
| fam_routes: | |
| name: Allocate FAM Routes | |
| concurrency: | |
| group: fam-routes-global | |
| cancel-in-progress: false | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| hybrid_route_number: ${{ steps.allocate.outputs.route_hybrid }} | |
| postgres_route_number: ${{ steps.allocate.outputs.route_postgres }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Allocate FAM routes | |
| id: allocate | |
| uses: ./.github/actions/allocate-fam-routes | |
| with: | |
| oc_token: ${{ secrets.OC_TOKEN }} | |
| oc_namespace: ${{ vars.OC_NAMESPACE }} | |
| oc_server: ${{ vars.OC_SERVER }} | |
| pr_number: ${{ github.event.number }} | |
| deploys: | |
| name: Deploys (${{ github.event.number }}) | |
| needs: [builds, fam_routes] | |
| strategy: | |
| matrix: | |
| primary_db: [oracle, postgres] | |
| include: | |
| - primary_db: oracle | |
| fam_route_number: ${{ needs.fam_routes.outputs.hybrid_route_number }} | |
| deployment_model: hybrid | |
| - primary_db: postgres | |
| fam_route_number: ${{ needs.fam_routes.outputs.postgres_route_number }} | |
| deployment_model: postgres | |
| secrets: inherit | |
| uses: ./.github/workflows/.deploy.yml | |
| with: | |
| backend_cpu_request: "30m" | |
| backend_min_replicas: "1" | |
| backend_max_replicas: "1" | |
| backend_primary_db: "${{ matrix.primary_db }}" | |
| fam_route_number: "${{ matrix.fam_route_number }}" | |
| target: "${{ github.event.number }}-${{ matrix.deployment_model }}" | |
| deployment_model: ${{ matrix.deployment_model }} | |
| triggers: '' | |
| cleanup_configmap: | |
| name: Cleanup ConfigMap After Deployment (${{ github.event.number }}) | |
| needs: [fam_routes, deploys] | |
| if: success() | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Remove route reservations from ConfigMap | |
| uses: bcgov/action-oc-runner@v1.4.0 | |
| env: | |
| PR_NUMBER: ${{ github.event.number }} | |
| HYBRID_ROUTE: ${{ needs.fam_routes.outputs.hybrid_route_number }} | |
| POSTGRES_ROUTE: ${{ needs.fam_routes.outputs.postgres_route_number }} | |
| with: | |
| oc_namespace: ${{ vars.OC_NAMESPACE }} | |
| oc_server: ${{ vars.OC_SERVER }} | |
| oc_token: ${{ secrets.OC_TOKEN }} | |
| commands: | | |
| echo "Deployment successful - removing route reservations from ConfigMap" | |
| echo "PR: $PR_NUMBER, Hybrid route: $HYBRID_ROUTE, Postgres route: $POSTGRES_ROUTE" | |
| # Check if ConfigMap exists | |
| if ! oc get configmap fam-route-allocations &>/dev/null; then | |
| echo "ConfigMap fam-route-allocations does not exist, nothing to clean up" | |
| exit 0 | |
| fi | |
| # Remove hybrid route reservation | |
| if [[ -n "$HYBRID_ROUTE" ]]; then | |
| oc patch configmap fam-route-allocations --type merge \ | |
| -p "{\"data\": {\"hybrid_${HYBRID_ROUTE}\": null}}" || true | |
| echo "Removed hybrid route $HYBRID_ROUTE reservation" | |
| fi | |
| # Remove postgres route reservation | |
| if [[ -n "$POSTGRES_ROUTE" ]]; then | |
| oc patch configmap fam-route-allocations --type merge \ | |
| -p "{\"data\": {\"postgres_${POSTGRES_ROUTE}\": null}}" || true | |
| echo "Removed postgres route $POSTGRES_ROUTE reservation" | |
| fi | |
| results: | |
| name: PR Results | |
| if: always() | |
| # Include all needs that could have failures! | |
| needs: [builds, fam_routes, deploys] | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - run: | | |
| # View results | |
| echo "needs.*.result: ${{ toJson(needs.*.result) }}" | |
| - if: contains(needs.*.result, 'failure')||contains(needs.*.result, 'canceled') | |
| run: | | |
| # Job failure found | |
| echo "At least one job has failed" | |
| exit 1 | |