ci: zip artifact into eponymous directory.
ci: Fix condition to skip publish Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
17
.github/workflows/bake.yml
vendored
17
.github/workflows/bake.yml
vendored
@@ -50,14 +50,17 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
default: ${{vars.CI_PRINT_BAKE || false}}
|
default: ${{vars.CI_PRINT_BAKE || false}}
|
||||||
description: Print the computed receipe.
|
description: Print the computed receipe.
|
||||||
artifact:
|
|
||||||
type: string
|
|
||||||
default: '{}'
|
|
||||||
description: Map of targets to artifact files to upload
|
|
||||||
fail_fast:
|
fail_fast:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
description: Fail-fast for the underlying matrix.
|
description: Fail-fast for the underlying matrix.
|
||||||
|
artifact:
|
||||||
|
type: string
|
||||||
|
default: '{}'
|
||||||
|
description: >
|
||||||
|
Map of targets to artifact files to upload. Key is bake target (image prefix),
|
||||||
|
value is a JSON object containing keys 'src' and 'dst'. dst is the artifact name,
|
||||||
|
src is optional path inside image, defaulting to dst.
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
bake:
|
bake:
|
||||||
@@ -128,12 +131,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cid=$(docker create "$iid" /)
|
cid=$(docker create "$iid" /)
|
||||||
rm -rf _artifact
|
rm -rf _artifact
|
||||||
mkdir -p _artifact
|
mkdir -p _artifact/$dst/
|
||||||
docker cp "$cid:$src" "_artifact/$dst"
|
docker cp "$cid:$src" "_artifact/$dst/$dst"
|
||||||
|
|
||||||
- if: ${{ !failure() && !cancelled() && fromJSON(inputs.artifact)[matrix.bake_target].dst }}
|
- if: ${{ !failure() && !cancelled() && fromJSON(inputs.artifact)[matrix.bake_target].dst }}
|
||||||
name: Upload Artifact
|
name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
path: _artifact/${{ fromJSON(inputs.artifact)[matrix.bake_target].dst }}
|
||||||
name: ${{matrix.cargo_profile}}-${{matrix.feat_set}}-${{fromJSON(inputs.artifact)[matrix.bake_target].dst}}
|
name: ${{matrix.cargo_profile}}-${{matrix.feat_set}}-${{fromJSON(inputs.artifact)[matrix.bake_target].dst}}
|
||||||
path: _artifact/${{fromJSON(inputs.artifact)[matrix.bake_target].dst}}
|
|
||||||
|
|||||||
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
@@ -48,7 +48,7 @@ jobs:
|
|||||||
${{
|
${{
|
||||||
!failure() && !cancelled()
|
!failure() && !cancelled()
|
||||||
&& inputs.machines
|
&& inputs.machines
|
||||||
&& inputs.docker_repo
|
&& inputs.docker_repo != ''
|
||||||
&& github.ref == 'refs/heads/main'
|
&& github.ref == 'refs/heads/main'
|
||||||
}}
|
}}
|
||||||
name: Publish containers
|
name: Publish containers
|
||||||
|
|||||||
Reference in New Issue
Block a user