| 1 | --- |
| 2 | # Runs PackageCloud cleanup every day at 9pm |
| 3 | name: PackageCloud Cleanup |
| 4 | on: |
| 5 | schedule: |
| 6 | - cron: '0 21 * * *' |
| 7 | workflow_dispatch: null |
| 8 | |
| 9 | jobs: |
| 10 | cleanup: |
| 11 | name: PackageCloud Cleanup |
| 12 | runs-on: ubuntu-latest |
| 13 | if: github.repository == 'netdata/netdata' |
| 14 | strategy: |
| 15 | fail-fast: false |
| 16 | matrix: |
| 17 | repos: |
| 18 | - stable |
| 19 | - edge |
| 20 | - devel |
| 21 | steps: |
| 22 | - name: Checkout |
| 23 | uses: actions/checkout@v6 |
| 24 | id: checkout |
| 25 | with: |
| 26 | submodules: recursive |
| 27 | - name: Prepare environment |
| 28 | id: prepare |
| 29 | run: | |
| 30 | pip3 install requests python-dateutil |
| 31 | - name: Run PackageCloud Cleanup |
| 32 | id: cleanup |
| 33 | env: |
| 34 | PKGCLOUD_TOKEN: ${{ secrets.PACKAGE_CLOUD_API_KEY }} |
| 35 | run: | |
| 36 | python3 .github/scripts/netdata-pkgcloud-cleanup.py -r ${{ matrix.repos }} |