From deefd17c2acd937f07a4c3bfa4e6b7209b649156 Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Wed, 14 Oct 2026 20:16:35 -0700 Subject: [PATCH] ci: gate results jobs with bcgov/actions/workflow-results --- .github/workflows/analysis.yml | 17 ++++------------- .github/workflows/pr-open.yml | 17 ++++------------- .github/workflows/pr-validate.yml | 14 +++++++++++++- 3 files changed, 21 insertions(+), 27 deletions(-) diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index e9f0dc9..fbb254d 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -143,16 +143,7 @@ jobs: runs-on: ubuntu-26.04 timeout-minutes: 1 steps: - - name: Log Job Results Context - run: | - echo "=== Upstream Job Statuses ===" - echo '${{ toJson(needs) }}' - - - name: Evaluate Overall Status - if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') - run: | - echo "At least one required job failed or was cancelled." - exit 1 - - - name: Success Message - run: echo "All required jobs passed or were intentionally skipped." + - uses: bcgov/actions/workflow-results@79aefe3a7abb2d0d00b1b3ea4cfbf12727a10638 # v0.9.0 + with: + needs: ${{ toJson(needs) }} + title: "Analysis Results" diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index f5f7106..4c8a564 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -124,16 +124,7 @@ jobs: runs-on: ubuntu-26.04 timeout-minutes: 1 steps: - - name: Log Job Results Context - run: | - echo "=== Upstream Job Statuses ===" - echo '${{ toJson(needs) }}' - - - name: Evaluate Overall Status - if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') - run: | - echo "At least one required job failed or was cancelled." - exit 1 - - - name: Success Message - run: echo "All required jobs passed or were intentionally skipped." + - uses: bcgov/actions/workflow-results@79aefe3a7abb2d0d00b1b3ea4cfbf12727a10638 # v0.9.0 + with: + needs: ${{ toJson(needs) }} + title: "PR Results" diff --git a/.github/workflows/pr-validate.yml b/.github/workflows/pr-validate.yml index ea11a2b..1149cfd 100644 --- a/.github/workflows/pr-validate.yml +++ b/.github/workflows/pr-validate.yml @@ -12,7 +12,7 @@ permissions: {} jobs: validate: - name: Validate Results + name: Validate PR if: (! github.event.pull_request.draft) runs-on: ubuntu-26.04 permissions: @@ -35,3 +35,15 @@ jobs: After merge, new images are deployed in: - [Merge Workflow](https://github.com/${{ github.repository }}/actions/workflows/merge.yml) + + results: + name: Validate Results + needs: [validate] + if: always() + runs-on: ubuntu-slim + timeout-minutes: 1 + steps: + - uses: bcgov/actions/workflow-results@79aefe3a7abb2d0d00b1b3ea4cfbf12727a10638 # v0.9.0 + with: + needs: ${{ toJson(needs) }} + title: "Validate Results"