Skip to content

Test Report

Test Report #177

Workflow file for this run

name: Test Report
on:
# ① Automatic – when the Test workflow ends on main / develop
workflow_run:
workflows: ["Test"]
types: [completed]
branches: [main, develop]
# ② Manual re-run / ad-hoc report
workflow_dispatch:
inputs:
test_run_id:
description: "Run ID of the completed Test workflow (see the URL)"
required: true
type: string
branch:
description: "Branch that Test was run on"
required: true
type: choice
options: [main, develop]
default: develop
permissions:
contents: read
actions: read
checks: write
jobs:
discover-auto:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_run' }} # ← then the condition
outputs:
branch_name: ${{ steps.meta.outputs.branch }}
sha: ${{ steps.meta.outputs.sha }}
run_id: ${{ steps.meta.outputs.run_id }}
steps:
- id: meta
run: |
echo "branch=${{ github.event.workflow_run.head_branch }}" >> "$GITHUB_OUTPUT"
echo "sha=${{ github.event.workflow_run.head_sha }}" >> "$GITHUB_OUTPUT"
echo "run_id=${{ github.event.workflow_run.id }}" >> "$GITHUB_OUTPUT"
report-auto-main:
needs: discover-auto
if: ${{ github.event_name == 'workflow_run' &&
needs.discover-auto.result == 'success' &&
needs.discover-auto.outputs.branch_name == 'main' }}
uses: Stillpoint-Software/shared-workflows/.github/workflows/test-report.yml@main
with:
test_run_id: ${{ needs.discover-auto.outputs.run_id }}
branch: main
secrets: inherit
report-auto-develop:
needs: discover-auto
if: ${{ github.event_name == 'workflow_run' &&
needs.discover-auto.result == 'success' &&
needs.discover-auto.outputs.branch_name == 'develop' }}
uses: Stillpoint-Software/shared-workflows/.github/workflows/test-report.yml@develop
with:
test_run_id: ${{ needs.discover-auto.outputs.run_id }}
branch: develop
secrets: inherit
report-manual-main:
if: ${{ github.event_name == 'workflow_dispatch' && inputs.branch == 'main' }}
uses: Stillpoint-Software/shared-workflows/.github/workflows/test-report.yml@main
with:
test_run_id: ${{ inputs.test_run_id }}
branch: main
secrets: inherit
report-manual-develop:
if: ${{ github.event_name == 'workflow_dispatch' && inputs.branch == 'develop' }}
uses: Stillpoint-Software/shared-workflows/.github/workflows/test-report.yml@develop
with:
test_run_id: ${{ inputs.test_run_id }}
branch: develop
secrets: inherit