Skip to content

Commit 8b5bbad

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

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/rootfs.yml

+4-4
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,15 +25,15 @@ 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
3332

3433
jobs:
3534
check-cache:
3635
name: Check cache (${{ inputs.arch }})
36+
if: inputs.use-cached == 'true'
3737
runs-on: ${{ inputs.host-os }}
3838
outputs:
3939
cache-hit: ${{ steps.cache-check.outputs.cache-hit }}
@@ -69,7 +69,7 @@ jobs:
6969
rootfs:
7070
name: rootfs (${{ inputs.arch }})
7171
needs: check-cache
72-
if: needs.check-cache.outputs.cache-hit != 'true'
72+
if: inputs.use-cached == 'false' || needs.check-cache.outputs.cache-hit != 'true'
7373
runs-on: ${{ inputs.host-os }}
7474
env:
7575
# ARCH isn't directly used by the workflow, but it is used by the `make` commands

0 commit comments

Comments
 (0)