Skip to content

Commit ad44bac

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

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/rootfs.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Build Rootfs
22
on:
3+
push:
34
workflow_dispatch:
45
inputs:
56
host-os:
@@ -25,15 +26,15 @@ on:
2526
arch:
2627
required: true
2728
type: string
28-
# TODO: Actually use this
29-
cache:
29+
use-cached:
3030
required: false
3131
type: boolean
3232
default: true
3333

3434
jobs:
3535
check-cache:
3636
name: Check cache (${{ inputs.arch }})
37+
if: inputs.use-cached == 'true'
3738
runs-on: ${{ inputs.host-os }}
3839
outputs:
3940
cache-hit: ${{ steps.cache-check.outputs.cache-hit }}
@@ -69,7 +70,7 @@ jobs:
6970
rootfs:
7071
name: rootfs (${{ inputs.arch }})
7172
needs: check-cache
72-
if: needs.check-cache.outputs.cache-hit != 'true'
73+
if: inputs.use-cached == 'false' || needs.check-cache.outputs.cache-hit != 'true'
7374
runs-on: ${{ inputs.host-os }}
7475
env:
7576
# ARCH isn't directly used by the workflow, but it is used by the `make` commands

0 commit comments

Comments
 (0)