Add cache rootfs creation cleanup for old files to Github Actions (#2947)
This commit is contained in:
parent
a3c7334dad
commit
9d1ed95d9a
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@ -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"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user