Debug workflow for experimentation #59
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Debug workflow for experimentation | |
on: | |
workflow_dispatch | |
permissions: | |
id-token: write | |
contents: read | |
# env: | |
# ENV_VMS: "vm1, vm2, vm3" | |
jobs: | |
set-vars: | |
environment: test | |
runs-on: ubuntu-latest | |
outputs: | |
testvms: ${{ steps.setvms.outputs.vms }} | |
steps: | |
- name: set the VM list for subsequent jobs | |
id: setvms | |
run: | | |
echo 'vms=[vm1, vm2]' >> "$GITHUB_OUTPUT" | |
env-debug: | |
needs: [set-vars] | |
environment: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: print inputs | |
run: | | |
echo ${{ needs.set-vars.outputs.testvms }} | |
# echo ${{ toJson(needs.set-vars.outputs.testvms) }} | |
env-matrix: | |
needs: [set-vars] | |
environment: test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
vmlist: ${{ fromJson(needs.set-vars.outputs.testvms) }} | |
steps: | |
- name: run over the matrix list | |
run: | | |
echo ${{ matrix.vmlist }} | |
# static-matrix: | |
# strategy: | |
# matrix: | |
# vmlist: [vm1, vm2, vm3] | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: run over the matrix list | |
# run: | | |
# echo ${{ matrix.vmlist }} | |
# run-steps-if-true: | |
# runs-on: ubuntu-latest | |
# environment: test | |
# steps: | |
# - name: Run a simple step 3 | |
# if: vars.DEPLOY_STUFF == 'yes' | |
# run: echo "vars.DEPLOY_STUFF:" ${{ vars.DEPLOY_STUFF }} | |