ci: Workaround multi-line if-condition github bug; cleanup.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-06-01 20:19:18 +00:00
parent 841253692d
commit 873cac5731
7 changed files with 115 additions and 93 deletions

View File

@@ -65,11 +65,9 @@ on:
jobs:
bake:
if: >
${{
!failure() && !cancelled()
&& fromJSON(inputs.machines)[0] != null
&& fromJSON(inputs.bake_targets)[0] != null
}}
!failure() && !cancelled()
&& fromJSON(inputs.machines)[0] != null
&& fromJSON(inputs.bake_targets)[0] != null
name: >
${{matrix.bake_target}}
@@ -124,7 +122,11 @@ jobs:
# Optionally extract an inner artifact
- name: Extract Artifact
if: ${{ !failure() && !cancelled() && fromJSON(inputs.artifact)[matrix.bake_target].dst && fromJSON(inputs.artifact)[matrix.bake_target].img == null }}
if: >
!failure() && !cancelled()
&& fromJSON(inputs.artifact)[matrix.bake_target].dst
&& fromJSON(inputs.artifact)[matrix.bake_target].img == null
env:
iid: ${{matrix.bake_target}}--${{matrix.cargo_profile}}--${{matrix.rust_toolchain}}--${{matrix.rust_target}}--${{matrix.feat_set}}--${{matrix.sys_name}}--${{matrix.sys_version}}--${{matrix.sys_target}}
dst: ${{ fromJSON(inputs.artifact)[matrix.bake_target].dst }}
@@ -138,7 +140,11 @@ jobs:
# Optionally extract the image itself as an artifact.
- name: Extract Image
if: ${{ !failure() && !cancelled() && fromJSON(inputs.artifact)[matrix.bake_target].dst && fromJSON(inputs.artifact)[matrix.bake_target].img != null }}
if: >
!failure() && !cancelled()
&& fromJSON(inputs.artifact)[matrix.bake_target].dst
&& fromJSON(inputs.artifact)[matrix.bake_target].img != null
env:
iid: ${{matrix.bake_target}}--${{matrix.cargo_profile}}--${{matrix.rust_toolchain}}--${{matrix.rust_target}}--${{matrix.feat_set}}--${{matrix.sys_name}}--${{matrix.sys_version}}--${{matrix.sys_target}}
dst: ${{ fromJSON(inputs.artifact)[matrix.bake_target].dst }}
@@ -150,7 +156,10 @@ jobs:
# Upload either artifact
- name: Upload Artifact
if: ${{ !failure() && !cancelled() && fromJSON(inputs.artifact)[matrix.bake_target].dst }}
if: >
!failure() && !cancelled()
&& fromJSON(inputs.artifact)[matrix.bake_target].dst
uses: actions/upload-artifact@v4
with:
path: _artifact/${{ fromJSON(inputs.artifact)[matrix.bake_target].dst }}