Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
alliepiper committed Jun 2, 2024
1 parent 73079e9 commit e037874
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 132 deletions.
2 changes: 1 addition & 1 deletion .github/actions/workflow-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ inputs:
outputs:
workflow:
description: "The dispatchable workflows"
value: ${{ steps.outputs.outputs.WORKFLOW }}
value: ${{ toJSON(steps.outputs.outputs.WORKFLOW) }}

runs:
using: "composite"
Expand Down
39 changes: 34 additions & 5 deletions .github/workflows/ci-workflow-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,51 @@ jobs:
${{ env.pr_worflow }}
${{ env.nightly_workflow }}
run-workflow:
name: Run workflow
dispatch-groups-linux-two-stage:
name: ${{ matrix.name }}
needs: build-workflow
if: toJSON(fromJSON(needs.build-workflow.outputs.workflow).linux_two_stage.keys) != '[]'
permissions:
id-token: write
contents: read
uses: ./.github/workflows/workflow-dispatch.yml
strategy:
fail-fast: false
matrix:
name: ${{ fromJSON(needs.build-workflow.outputs.workflow).linux_two_stage.keys }}
uses: ./.github/workflows/workflow-dispatch-two-stage-group-linux.yml
with:
workflow: ${{ needs.build-workflow.outputs.workflow }}
name: ${{ matrix.name }}
pc-array: ${{ toJSON(fromJSON(needs.build-workflow.outputs.workflow).linux_two_stage.jobs[matrix.name]) }}

debug-workflow:
name: "Debug workflow"
needs: build-workflow
env:
WORKFLOW: ${{ needs.build-workflow.outputs.workflow }}
runs-on: ubuntu-latest
steps:
- name: Debug
if: ${{ fromJSON(needs.build-workflow.outputs.workflow) }}
run: |
echo "Debugging workflow..."
printf "%s\n" "${WORKFLOW}"
# run-workflow:
# name: Run workflow
# needs: build-workflow
# permissions:
# id-token: write
# contents: read
# uses: ./.github/workflows/workflow-dispatch.yml
# with:
# workflow: ${{ needs.build-workflow.outputs.workflow }}

verify-workflow:
name: Verify and summarize workflow results
if: ${{ always() && !cancelled() }}
needs:
- build-workflow
- run-workflow
- dispatch-groups-linux-two-stage
permissions:
contents: read
pull-requests: write # Posts a comment back to the PR.
Expand Down
51 changes: 0 additions & 51 deletions .github/workflows/workflow-dispatch-job-array-linux.yml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/workflow-dispatch-job-single-linux.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/workflow-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,3 @@ on:
required: true

jobs:
dispatch-groups-linux-two-stage:
if: ${{ fromJSON(inputs.workflow)['linux_two_stage']['keys'] }}
name: ${{ matrix.name }}
permissions:
id-token: write
contents: read
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(inputs.workflow)['linux_two_stage']['keys'] }}
uses: ./.github/workflows/workflow-dispatch-two-stage-group-linux.yml
with:
name: ${{ matrix.name }}
pc-array: ${{ toJSON(fromJSON(inputs.workflow)['linux_two_stage']['jobs'][matrix.name]) }}

debug-workflow:
name: "Debug workflow-dispatch.yml"
runs-on: ubuntu-latest
steps:
- name: Debug
run: |
echo "Debugging workflow:"
echo "Workflow:\n ${{inputs.workflow }}\n\n"
# echo "Linux Two Stage:\n${{ fromJSON(inputs.workflow)['linux_two_stage'] }}\n\n"
# echo "Keys:\n${{ fromJSON(inputs.workflow)['linux_two_stage']['keys'] }}\n\n"
# echo "Jobs:\n${{ fromJSON(inputs.workflow)['linux_two_stage']['jobs'] }}\n\n"

0 comments on commit e037874

Please sign in to comment.