Removing old packages #793
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cleanup | |
on: | |
push: | |
branches: | |
- main | |
defaults: | |
run: | |
shell: bash | |
permissions: | |
contents: write | |
jobs: | |
clean-old-packages: | |
runs-on: ubuntu-latest | |
container: debian:bookworm | |
steps: | |
- name: Install dependencies | |
run: | | |
apt-get update && apt-get install --yes python3-debian git git-lfs | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
token: ${{ secrets.PUSH_TOKEN }} | |
- name: Clean old packages | |
run: | | |
git config --global --add safe.directory '*' | |
find core -mindepth 1 -maxdepth 2 -type d | xargs -I '{}' ./scripts/clean-old-packages '{}' 4 | |
find workstation -mindepth 1 -maxdepth 2 -type d | xargs -I '{}' ./scripts/clean-old-packages '{}' 4 | |
git add . | |
git config --global user.email "[email protected]" | |
git config --global user.name "sdcibot" | |
git diff-index --quiet HEAD || git commit -m "Removing old packages" | |
git push origin main |