Skip to content

chore: test contributing pipeline #22

chore: test contributing pipeline

chore: test contributing pipeline #22

Workflow file for this run

# This parent pipeline only runs and routes to the correct child workflow after validation checks.
name: Parent Pipeline
on:
push:
branches:
- '*' # Matches any branch
pull_request:
branches:
- '*' # Matches pull requests to any branch
jobs:
determine-workflow:
name: Determine Workflow Context
runs-on: ubuntu-latest
outputs:
branch_name: ${{ steps.determine.outputs.branch_name }}
event_name: ${{ steps.determine.outputs.event_name }}
steps:

Check failure on line 20 in .github/workflows/parent-pipeline.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/parent-pipeline.yml

Invalid workflow file

You have an error in your yaml syntax on line 20
- id: determine
name: Extract Branch and Event
run: |
echo "Extracting branch and event context..."
# Extract branch name based on ref type
if [[ "${{ github.ref }}" == refs/heads/* ]]; then
branch_name="${{ github.ref#refs/heads/ }}" # Strip refs/heads/
elif [[ "${{ github.ref }}" == refs/pull/* ]]; then
branch_name="pull_request_${{ github.event.pull_request.number }}" # Handle pull requests
elif [[ "${{ github.ref }}" == refs/tags/* ]]; then
branch_name="${{ github.ref#refs/tags/ }}" # Handle tags
else
branch_name="${{ github.ref }}" # Default to raw ref
fi
echo "Branch Name: $branch_name"
echo "Event Name: ${{ github.event_name }}"
# Set outputs
echo "branch_name=$branch_name" >> $GITHUB_OUTPUT
echo "event_name=${{ github.event_name }}" >> $GITHUB_OUTPUT
# Set outputs
echo "branch_name=$branch_name" >> $GITHUB_OUTPUT
echo "event_name=${{ github.event_name }}" >> $GITHUB_OUTPUT
- name: Debug Branch Name
run: |
echo "Extracted Branch Name: ${{ needs.determine-workflow.outputs.branch_name }}"
echo "Event Name: ${{ needs.determine-workflow.outputs.event_name }}"
trigger-validation:
name: Trigger Validation Workflow
needs: determine-workflow
uses: ./.github/workflows/validation-workflow.yml
with:
branch_name: ${{ needs.determine-workflow.outputs.branch_name }}
event_name: ${{ needs.determine-workflow.outputs.event_name }}
trigger-contributor-workflow:
name: Trigger Contributor Workflow
needs: trigger-validation
if: |
github.event_name == 'push' &&
needs.determine-workflow.outputs.branch_name != 'main' &&
needs.determine-workflow.outputs.branch_name != 'qa' &&
needs.determine-workflow.outputs.branch_name != 'beta'
uses: ./.github/workflows/contributor-workflow.yml
with:
branch_name: ${{ needs.determine-workflow.outputs.branch_name }}
event_name: ${{ needs.determine-workflow.outputs.event_name }}
trigger-qa-workflow:
name: Trigger QA Workflow
needs: trigger-validation
if: |
github.event_name == 'pull_request' &&
github.base_ref == 'qa'
uses: ./.github/workflows/qa-workflow.yml
with:
branch_name: ${{ needs.determine-workflow.outputs.branch_name }}
event_name: ${{ needs.determine-workflow.outputs.event_name }}
trigger-beta-workflow:
name: Trigger Beta Workflow
needs: trigger-validation
if: |
github.event_name == 'pull_request' &&
github.base_ref == 'beta'
uses: ./.github/workflows/beta-workflow.yml
with:
branch_name: ${{ needs.determine-workflow.outputs.branch_name }}
event_name: ${{ needs.determine-workflow.outputs.event_name }}
trigger-main-workflow:
name: Trigger Main Workflow
needs: trigger-validation
if: |
github.event_name == 'pull_request' &&
github.base_ref == 'main'
uses: ./.github/workflows/main-workflow.yml
with:
branch_name: ${{ needs.determine-workflow.outputs.branch_name }}
event_name: ${{ needs.determine-workflow.outputs.event_name }}