chore: limpar builds antigos com sudo
This commit is contained in:
parent
09bb9cac28
commit
4075c048ca
1 changed files with 5 additions and 1 deletions
6
.github/workflows/ci-cd-web-desktop.yml
vendored
6
.github/workflows/ci-cd-web-desktop.yml
vendored
|
|
@ -236,7 +236,11 @@ jobs:
|
|||
|
||||
- name: Cleanup old build workdirs (keep last 3)
|
||||
run: |
|
||||
ls -1dt $HOME/apps/sistema.build.* 2>/dev/null | tail -n +4 | xargs -r rm -rf || true
|
||||
set -e
|
||||
find "$HOME/apps" -maxdepth 1 -type d -name 'sistema.build.*' | sort -r | tail -n +4 | while read dir; do
|
||||
echo "Removing $dir"
|
||||
sudo rm -rf "$dir"
|
||||
done || true
|
||||
|
||||
- name: Restart web service with new code
|
||||
run: |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue