Skip to content

Develop

Develop #2

Workflow file for this run

name: Run Tests
on:
workflow_run:
workflows: [Create Prerelease, Create Release]
types: [requested]
branches: [main, develop]
workflow_dispatch:
pull_request:
types: [opened, edited, synchronize, reopened]
branches: [main, develop]
permissions:
contents: read
actions: read
jobs:
discover:
runs-on: ubuntu-latest
outputs:
branch_name: ${{ steps.set_branch.outputs.branch_name }}
steps:
- id: set_branch
shell: bash
run: |
# 1. Pick the raw branch/ref for each trigger type
if [[ "${{ github.event_name }}" == "workflow_run" ]]; then
RAW='${{ github.event.workflow_run.head_branch }}'
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
RAW='${{ github.event.pull_request.base.ref }}'
else
RAW='${{ github.ref }}'
fi
# 2. Strip the refs/heads/ prefix if present
CLEAN="${RAW#refs/heads/}"
echo "Detected branch: $CLEAN"
echo "branch_name=$CLEAN" >> "$GITHUB_OUTPUT"
test:
needs: discover
uses: Stillpoint-Software/shared-workflows/.github/workflows/run_tests.yml@main
with:
branch: ${{ needs.discover.outputs.branch_name }}
solution_name: ${{ vars.SOLUTION_NAME }}
secrets: inherit