Skip to content

Commit 9bc5a97

Browse files
committed
Use cache in rootfs workflow only if use-cached is set
1 parent 52de825 commit 9bc5a97

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

.github/workflows/rootfs.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
options:
1313
- x86_64
1414
- arm64
15-
cache:
15+
use-cached:
1616
required: false
1717
type: boolean
1818
default: false
@@ -25,8 +25,7 @@ on:
2525
arch:
2626
required: true
2727
type: string
28-
# TODO: Actually use this
29-
cache:
28+
use-cached:
3029
required: false
3130
type: boolean
3231
default: true
@@ -45,6 +44,7 @@ jobs:
4544
steps:
4645

4746
- name: Restore cache for rootfs
47+
if: ${{ inputs.use-cached == true }}
4848
id: cache-check
4949
uses: actions/cache/restore@v4
5050
with:
@@ -99,9 +99,6 @@ jobs:
9999
# Test generating rootfs in non-standard location
100100
ROOTFS=${ALPINE_ROOTFS} make rootfs-init
101101
102-
# Verify it matches previously generated rootfs
103-
cmp ./${ALPINE_ROOTFS} ./rootfs/${ALPINE_ROOTFS}
104-
105102
# Generate ubuntu rootfs and cpio (with CPIO at a non-standard location)
106103
scripts/ubuntu_debootstrap.sh jammy ${{ inputs.arch }}
107104
SUDO=1 ROOTFS_DIR=./rootfs/ubuntu-jammy-${{ inputs.arch }} CPIO_FILE=${UBUNTU_CPIO} make rootfs-overlay

0 commit comments

Comments
 (0)