File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 44
44
run : |
45
45
New-Item -Path build.log -ItemType File -Force
46
46
docker build --cache-from app:latest -f docker/mount.dockerfile -t app:latest . | Tee-Object -FilePath build.log
47
- $total_steps = (Get-Content build.log | Select-String -Pattern '^Step [0-9]+/' | Measure-Object).Count
48
47
$cache_hits = (Get-Content build.log | Select-String -Pattern '---> Using cache' | Measure-Object).Count
49
- if ($cache_hits -eq $total_steps) {
48
+ $steps_with_cache = (Get-Content build.log | Select-String -Pattern '^Step [0-9]+/' | Where-Object { $_ -notmatch 'FROM' } | Measure-Object).Count
49
+ if ($cache_hits -eq $steps_with_cache) {
50
50
echo "FULL_CACHE_HIT=true" >> $env:GITHUB_ENV
51
51
Write-Host "Full cache hit, all layers were used from source cache."
52
52
} else {
You can’t perform that action at this time.
0 commit comments