Skip to content

Commit

Permalink
chore: additional to workflow configurations-env
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Andrews <[email protected]>
  • Loading branch information
ABC2015 committed Nov 28, 2024
1 parent 434f839 commit 5155073
Showing 1 changed file with 17 additions and 22 deletions.
39 changes: 17 additions & 22 deletions .github/workflows/parent-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,43 +15,38 @@ jobs:
name: Determine Workflow Context
runs-on: ubuntu-latest
outputs:
branch_name: ${{ steps.determine.outputs.branch }}
event_name: ${{ steps.determine.outputs.event }}
branch_name: ${{ steps.determine.outputs.branch_name }}
event_name: ${{ steps.determine.outputs.event_name }}
steps:
- id: determine
name: Extract Branch and Event
run: |
echo "Extracting branch and event context..."
echo "Branch Name: ${{ github.ref_name }}"
echo "Event Name: ${{ github.event_name }}"
echo "branch=${{ github.ref_name }}" >> $GITHUB_OUTPUT
echo "event=${{ github.event_name }}" >> $GITHUB_OUTPUT
echo "branch_name=${{ github.ref_name }}" >> $GITHUB_OUTPUT
echo "event_name=${{ github.event_name }}" >> $GITHUB_OUTPUT
trigger-validation:
name: Trigger Validation Workflow
needs: determine-workflow
uses: ./.github/workflows/validation-workflow.yml
with:
branch_name: ${{ needs.determine-workflow.outputs.branch }}
event_name: ${{ needs.determine-workflow.outputs.event }}
steps:
- name: Debug Validation Inputs
run: |
echo "Branch Name Passed: ${{ needs.determine-workflow.outputs.branch_name }}"
echo "Event Name Passed: ${{ needs.determine-workflow.outputs.event }}"
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 != 'main' &&
needs.determine-workflow.outputs.branch != 'qa' &&
needs.determine-workflow.outputs.branch != 'beta'
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 }}
event_name: ${{ needs.determine-workflow.outputs.event }}
branch_name: ${{ needs.determine-workflow.outputs.branch_name }}
event_name: ${{ needs.determine-workflow.outputs.event_name }}

trigger-qa-workflow:
name: Trigger QA Workflow
Expand All @@ -61,8 +56,8 @@ jobs:
github.base_ref == 'qa'
uses: ./.github/workflows/qa-workflow.yml
with:
branch_name: ${{ needs.determine-workflow.outputs.branch }}
event_name: ${{ needs.determine-workflow.outputs.event }}
branch_name: ${{ needs.determine-workflow.outputs.branch_name }}
event_name: ${{ needs.determine-workflow.outputs.event_name }}

trigger-beta-workflow:
name: Trigger Beta Workflow
Expand All @@ -72,8 +67,8 @@ jobs:
github.base_ref == 'beta'
uses: ./.github/workflows/beta-workflow.yml
with:
branch_name: ${{ needs.determine-workflow.outputs.branch }}
event_name: ${{ needs.determine-workflow.outputs.event }}
branch_name: ${{ needs.determine-workflow.outputs.branch_name }}
event_name: ${{ needs.determine-workflow.outputs.event_name }}

trigger-main-workflow:
name: Trigger Main Workflow
Expand All @@ -83,5 +78,5 @@ jobs:
github.base_ref == 'main'
uses: ./.github/workflows/main-workflow.yml
with:
branch_name: ${{ needs.determine-workflow.outputs.branch }}
event_name: ${{ needs.determine-workflow.outputs.event }}
branch_name: ${{ needs.determine-workflow.outputs.branch_name }}
event_name: ${{ needs.determine-workflow.outputs.event_name }}

0 comments on commit 5155073

Please sign in to comment.