From c9a6f971746bcb92b48e91980a1d582217f7ed03 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 4 Jun 2025 06:08:23 +0000 Subject: [PATCH] ci: Upload artifact from runner workdir. Signed-off-by: Jason Volk --- .github/workflows/bake.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/bake.yml b/.github/workflows/bake.yml index 73f6b06a..6c1a8c5c 100644 --- a/.github/workflows/bake.yml +++ b/.github/workflows/bake.yml @@ -126,6 +126,7 @@ jobs: !failure() && !cancelled() && fromJSON(inputs.artifact)[matrix.bake_target].dst && fromJSON(inputs.artifact)[matrix.bake_target].img == null + && !fromJSON(inputs.artifact)[matrix.bake_target].runner 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}} @@ -154,6 +155,22 @@ jobs: mkdir -p "_artifact" docker save -o "_artifact/$dst" "$iid" + # Optionally extract a runner artifact + - name: Extract Outer Artifact + if: > + !failure() && !cancelled() + && fromJSON(inputs.artifact)[matrix.bake_target].dst + && fromJSON(inputs.artifact)[matrix.bake_target].runner == true + + env: + dst: ${{ fromJSON(inputs.artifact)[matrix.bake_target].dst }} + src: ${{ fromJSON(inputs.artifact)[matrix.bake_target].src || fromJSON(inputs.artifact)[matrix.bake_target].dst }} + + run: | + rm -rf _artifact + mkdir -p "_artifact" + mv "$src" "_artifact/$dst" + # Upload either artifact - name: Upload Artifact if: >