Describe the enhancement
I'm finding that it is quite annoying to have to define an if condition for every single item in the steps section of a test matrix. It would be great if you could define a block per se
Code Snippet
For instance, let's say I have a setup like so
# Linux-name: Wait/Sleep
uses: jakejarvis/wait-action@v0.1.0if: ${{runner.os=='Linux'}}with:
time: '1m'-name: CollectDockerLogs
uses: jwalton/gh-docker-logs@v1.0.0if: ${{runner.os=='Linux'}}-name: Checkrunningcontainers
run: dockerps-aif: ${{runner.os=='Linux'}}-name: SetPGHOSTonLinux
run: echo"PGHOST=localhost">>$GITHUB_ENVif: ${{runner.os=='Linux'}}
# MacOS-name: SetPGUSERonmacOSrun: |echo"PGUSER=$USER">>$GITHUB_ENVecho"LIBPQJL_DATABASE_USER=$USER">>$GITHUB_ENVif: ${{runner.os=='macOS'}}-name: StartHomebrewPostgreSQLservice
run: pg_ctl-D/usr/local/var/postgresstartif: ${{runner.os=='macOS'}}
# Windows-name: AddPostgreSQLtoPathrun: |echo $env:PGBIN
echo $env:PGBIN|Out-File-FilePath$env:GITHUB_PATH-Encodingutf8-Appendif: ${{runner.os=='Windows'}}-name: StartWindowsPostgreSQLservicerun: |pg_ctl-D $env:PGDATAstartpg_ctl-D $env:PGDATAstatusif: ${{runner.os=='Windows'}}It would be awesome if it could be formatted like so:
# Linux-if: ${{runner.os=='Linux'}}-name: Wait/Sleep
uses: jakejarvis/wait-action@v0.1.0with:
time: '1m'-name: CollectDockerLogs
uses: jwalton/gh-docker-logs@v1.0.0-name: Checkrunningcontainers
run: dockerps-a-name: SetPGHOSTonLinux
run: echo"PGHOST=localhost">>$GITHUB_ENV
# MacOS-if: ${{runner.os=='macOS'}}-name: SetPGUSERonmacOSrun: |echo"PGUSER=$USER">>$GITHUB_ENVecho"LIBPQJL_DATABASE_USER=$USER">>$GITHUB_ENV-name: StartHomebrewPostgreSQLservice
run: pg_ctl-D/usr/local/var/postgresstart
# Windows-if: ${{runner.os=='Windows'}}-name: AddPostgreSQLtoPathrun: |echo $env:PGBIN
echo $env:PGBIN|Out-File-FilePath$env:GITHUB_PATH-Encodingutf8-Append-name: StartWindowsPostgreSQLservicerun: |pg_ctl-D $env:PGDATAstartpg_ctl-D $env:PGDATAstatus
Describe the enhancement
I'm finding that it is quite annoying to have to define an
ifcondition for every single item in thestepssection of a test matrix. It would be great if you could define ablockper seCode Snippet
For instance, let's say I have a setup like so
It would be awesome if it could be formatted like so: