Skip to content

Commit 3c2ae5a

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

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/rootfs.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ on:
1212
options:
1313
- x86_64
1414
- arm64
15-
cache:
16-
required: false
17-
type: boolean
18-
default: false
15+
use-cached:
16+
required: true
17+
type: string
18+
default: true
1919
workflow_call:
2020
inputs:
2121
host-os:
@@ -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)