diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 728bf9f67c..62d51fabd8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -121,7 +121,7 @@ jobs: gpg-private-key: ${{ secrets.GPG_KEY1 }} passphrase: ${{ secrets.GPG_PASSPHRASE1 }} - - name: Sign commit and push changes + - name: Cleanup and sign rootfs cache if: ${{ success() }} env: @@ -131,6 +131,13 @@ jobs: sudo apt-get -y -qq install parallel cd build/cache/rootfs sudo chown -R $USER:$USER . + # cleanup + for line in $(ls | cut -d. -f1-4 | sort -u); do + if [[ ! -f $line ]]; then + [[ -n "$line" ]] && rm -f "$line"* + fi + done + # sign (for file in $(ls | cut -d. -f1-4 | sort -u); do if [ $(ls $file* | wc -l) -lt 3 ]; then echo "$file"