From 4e12da15fadb9f91027ba5be9599b5dc5f239dbc Mon Sep 17 00:00:00 2001 From: Leonid Plyushch Date: Tue, 4 Feb 2020 14:47:20 +0200 Subject: [PATCH] CI: add script for automatic old versions cleanup Expected to be automatically started at 02:00 every day. Will go through all packages and remove versions that are no longer needed. Experimental, may cause metadata inconsistency until process is finished. --- .github/workflows/repository_cleanup.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/repository_cleanup.yml diff --git a/.github/workflows/repository_cleanup.yml b/.github/workflows/repository_cleanup.yml new file mode 100644 index 000000000..4379d725e --- /dev/null +++ b/.github/workflows/repository_cleanup.yml @@ -0,0 +1,20 @@ +name: APT repository cleanup + +on: + schedule: + - cron: '0 2 * * *' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Clone repository + uses: actions/checkout@v2 + - name: Delete old versions + env: + BINTRAY_USERNAME: xeffyr + BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }} + BINTRAY_GPG_SUBJECT: termux + BINTRAY_GPG_PASSPHRASE: ${{ secrets.BINTRAY_GPG_PASSWORD }} + run: | + ./scripts/package_uploader.sh -c $(cd ./packages; echo *)