Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Falourd <guillaume.falourd@zup.com.br>
  • Loading branch information
GuillaumeFalourd committed Sep 29, 2023
1 parent 327e3c2 commit c1d1054
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 37 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/action-test-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ jobs:
orchestration:
runs-on: macos-latest
outputs:
tasks: ${{ steps.tasks.outputs.tasks }}
runId: ${{ steps.tasks.outputs.runId }}
runType: ${{ steps.tasks.outputs.runType }}
tasks: ${{ steps.tasks.outputs.runTasks }}
steps:
- uses: stack-spot/runtime-manager-action@main
id: tasks
Expand All @@ -37,16 +35,14 @@ jobs:

- name: Check Run Data
run: |
echo "RunId: ${{ steps.tasks.outputs.runId }}"
echo "RunType: ${{ steps.tasks.outputs.runType }}"
echo "Tasks: ${{ steps.tasks.outputs.tasks }}"
echo "Tasks: ${{ steps.tasks.outputs.runTasks }}"
provision:
runs-on: macos-latest
needs: [orchestration]
strategy:
matrix:
task: ${{ fromJSON(needs.orchestration.outputs.tasks) }}
task: ${{ fromJSON(needs.orchestration.outputs.runTasks) }}
fail-fast: true
max-parallel: 1
steps:
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/action-test-ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ jobs:
orchestration:
runs-on: ubuntu-latest
outputs:
tasks: ${{ steps.tasks.outputs.tasks }}
runId: ${{ steps.tasks.outputs.runId }}
runType: ${{ steps.tasks.outputs.runType }}
tasks: ${{ steps.tasks.outputs.runTasks }}
steps:
- uses: stack-spot/runtime-manager-action@main
id: tasks
Expand All @@ -37,16 +35,14 @@ jobs:

- name: Check Run Data
run: |
echo "RunId: ${{ steps.tasks.outputs.runId }}"
echo "RunType: ${{ steps.tasks.outputs.runType }}"
echo "Tasks: ${{ steps.tasks.outputs.tasks }}"
echo "Tasks: ${{ steps.tasks.outputs.runTasks }}"
provision:
runs-on: ubuntu-latest
needs: [orchestration]
strategy:
matrix:
task: ${{ needs.orchestration.outputs.tasks }}
task: ${{ needs.orchestration.outputs.runTasks }}
fail-fast: true
max-parallel: 1
steps:
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/action-test-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ jobs:
orchestration:
runs-on: windows-latest
outputs:
tasks: ${{ steps.tasks.outputs.tasks }}
runId: ${{ steps.tasks.outputs.runId }}
runType: ${{ steps.tasks.outputs.runType }}
tasks: ${{ steps.tasks.outputs.runTasks }}
steps:
- uses: stack-spot/runtime-manager-action@main
id: tasks
Expand All @@ -37,17 +35,15 @@ jobs:

- name: Check Run Data
run: |
echo "RunId: ${{ steps.tasks.outputs.runId }}"
echo "RunType: ${{ steps.tasks.outputs.runType }}"
echo "Tasks: ${{ steps.tasks.outputs.tasks }}"
echo "Tasks: ${{ steps.tasks.outputs.runTasks }}"
shell: bash

provision:
runs-on: windows-latest
needs: [orchestration]
strategy:
matrix:
task: ${{ fromJSON(needs.orchestration.outputs.tasks) }}
task: ${{ fromJSON(needs.orchestration.outputs.runTasks) }}
fail-fast: true
max-parallel: 1
steps:
Expand Down
6 changes: 0 additions & 6 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ inputs:
required: false

outputs:
runId:
description: "Run ID"
value: ${{ steps.deploy.outputs.runId }}
runType:
description: "Run TYPE"
value: ${{ steps.deploy.outputs.runType }}
runTasks:
description: "RUN TASK LIST"
value: ${{ steps.deploy.outputs.tasks }}
Expand Down
12 changes: 2 additions & 10 deletions runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,8 @@
for task in tasks:
runTasks.append(task)

if VERBOSE is not None:
print("RUN ID:", runId)
print("RUN TYPE:", runType)
print("RUN TASKS:", runTasks)

with open(os.environ['GITHUB_OUTPUT'], "a") as f:
f.write(f"runId={runId}")

with open(os.environ['GITHUB_OUTPUT'], "a") as f:
f.write(f"runType={runType}")
print("RUN ID:", runId)
print("RUN TYPE:", runType)

with open(os.environ['GITHUB_OUTPUT'], "a") as f:
f.write(f"tasks={runTasks}")
Expand Down

0 comments on commit c1d1054

Please sign in to comment.