File tree Expand file tree Collapse file tree 1 file changed +15
-13
lines changed
Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -16,17 +16,19 @@ if (Test-Path $lastExecutionFile) {
1616 }
1717}
1818
19- if ($shouldExecute ) {
20- Write-Host " Executing daily maintenance..."
21-
22- # Update the last execution timestamp by touching the file
23- " Last maintenance executed at $ ( Get-Date ) " | Out-File $lastExecutionFile - Encoding UTF8
24-
25- # Remove all Docker images that have not been used for 7 days.
26- docker image prune - a -- filter " until=168h" -- force
19+ if (-not $shouldExecute ) {
20+ exit 0
21+ }
2722
28- # Pull this repo.
29- git pull
30-
31- Write-Host " Daily maintenance completed successfully."
32- }
23+ Write-Host " Executing daily maintenance..."
24+
25+ # Update the last execution timestamp by touching the file
26+ " Last maintenance executed at $ ( Get-Date ) " | Out-File $lastExecutionFile - Encoding UTF8
27+
28+ # Remove all Docker images that have not been used for 7 days.
29+ docker image prune - a -- filter " until=168h" -- force
30+
31+ # Pull this repo.
32+ git pull
33+
34+ Write-Host " Daily maintenance completed successfully."
You can’t perform that action at this time.
0 commit comments