Skip to content

Debug workflow for experimentation #52

Debug workflow for experimentation

Debug workflow for experimentation #52

Workflow file for this run

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 ${{ fromJson(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: ${{ 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 }}