Skip to content

Commit 8393d19

Browse files
authored
Update main.yml
1 parent 2770eee commit 8393d19

File tree

1 file changed

+25
-6
lines changed

1 file changed

+25
-6
lines changed

.github/workflows/main.yml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
id: restore-buildkit-cache
2828
with:
2929
path: |
30-
buildkit
30+
buildkit.tar.zst
3131
key: buildkit-${{ runner.os }}-
3232
restore-keys: |
3333
buildkit-${{ runner.os }}-
@@ -37,11 +37,24 @@ jobs:
3737
id: restore-droot-cache
3838
with:
3939
path: |
40-
droot
40+
droot.tar.zst
4141
key: droot-${{ runner.os }}-
4242
restore-keys: |
4343
droot-${{ runner.os }}-
4444
45+
- name: Unpack cache artifacts
46+
shell: pwsh
47+
run: |
48+
if ((Test-Path "buildkit.tar.zst")) {
49+
tar --zstd -xvf buildkit.tar.zst
50+
Write-Host "✅ unpacked buildkit!"
51+
}
52+
53+
if ((Test-Path "droot.tar.zst")) {
54+
tar --zstd -xvf droot.tar.zst
55+
Write-Host "✅ unpacked daemons root!"
56+
}
57+
4558
- name: Log in to Container Registry
4659
uses: docker/login-action@v3
4760
with:
@@ -164,8 +177,14 @@ jobs:
164177
} else {
165178
Write-Host "⚠️ buildkitd is not running."
166179
}
167-
168-
- uses: fawazahmed0/action-debug-vscode@main
180+
181+
- name: Pack cache
182+
shell: pwsh
183+
run: |
184+
tar --zstd -cvf buildkit.tar.zst .\buildkit\
185+
Write-Host "✅ packed buildkit!"
186+
tar --zstd -cvf droot.tar.zst .\droot\
187+
Write-Host "✅ packed daemons root!"
169188
170189
#- name: Build app image
171190
# shell: cmd
@@ -181,13 +200,13 @@ jobs:
181200
uses: actions/cache/save@v4
182201
with:
183202
path: |
184-
buildkit
203+
buildkit.tar.zst
185204
key: buildkit-${{ runner.os }}-
186205

187206
- name: Save Daemon Cache
188207
id: save-droot-cache
189208
uses: actions/cache/save@v4
190209
with:
191210
path: |
192-
droot
211+
droot.tar.zst
193212
key: droot-${{ runner.os }}-

0 commit comments

Comments
 (0)