File tree Expand file tree Collapse file tree 1 file changed +23
-11
lines changed Expand file tree Collapse file tree 1 file changed +23
-11
lines changed Original file line number Diff line number Diff line change @@ -10,25 +10,37 @@ jobs:
1010 runs-on : warp-ubuntu-latest-x64-32x
1111 steps :
1212 - uses : actions/checkout@v5
13- - name : Cache dependencies
14- id : cache
15- uses : actions/cache@v4
13+
14+ - name : Restore cache
15+ id : restore-cache
16+ uses : actions/cache/restore@v4
1617 with :
1718 path : |
18- **/mkosi.builddir/
19- **/mkosi.cache/
20- **/mkosi.tools/
21- key : mkosi-buildernet-${{ github.run_id }}
22- restore-keys : |
23- mkosi-buildernet-
19+ cache.tar
20+ key : mkosi-buildernet-
21+
2422 - name : Install mkosi
2523 run : |
2624 sudo apt-get update && sudo apt-get install -y debian-archive-keyring
2725 sudo -H pip3 install git+https://github.com/systemd/mkosi.git@$(cat .mkosi_version)
26+
27+ - name : Extract cache
28+ if : steps.restore-cache.outputs.cache-hit == 'true'
29+ run : |
30+ sudo tar -xf cache.tar
31+ sudo rm -f cache.tar
32+
2833 - name : Build image
2934 run : |
3035 sudo mkosi --force -I buildernet.conf --profile=devtools,gcp,local,cloud
36+
3137 - name : Prepare cache
3238 run : |
33- USER="$(id -u):$(id -g)"
34- sudo find . \( -name "mkosi.builddir" -o -name "mkosi.cache" -o -name "mkosi.tools" \) -type d 2>/dev/null -exec sudo chown -R "$USER" {} \+ || true
39+ sudo find . \( -name "mkosi.builddir" -o -name "mkosi.cache" -o -name "mkosi.tools" \) -type d -print0 | \
40+ sudo tar --null -rf cache.tar -T - 2>/dev/null || true
41+
42+ - uses : actions/cache/save@v4
43+ id : save-cache
44+ with :
45+ path : cache.tar
46+ key : mkosi-buildernet-${{ github.run_id }}
You can’t perform that action at this time.
0 commit comments