summaryrefslogtreecommitdiffstats
path: root/.github/workflows/packagecloud.yml
blob: 3c427756a4ba2c43a5915fb21ca3781ffbc1a4b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
# Runs PackageCloud cleanup every day at 9pm
name: PackageCloud Cleanup
on:
  schedule:
    - cron: '0 21 * * *'
  workflow_dispatch: null

jobs:
  cleanup:
    name: PackageCloud Cleanup
    runs-on: ubuntu-latest
    if: github.repository == 'netdata/netdata'
    strategy:
      fail-fast: false
      matrix:
        repos:
          - stable
          - edge
          - devel
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        id: checkout
        with:
          submodules: recursive
      - name: Prepare environment
        id: prepare
        run: |
          pip3 install requests python-dateutil
      - name: Run PackageCloud Cleanup
        id: cleanup
        env:
          PKGCLOUD_TOKEN: ${{ secrets.PACKAGE_CLOUD_API_KEY }}
        run: |
          python3 .github/scripts/netdata-pkgcloud-cleanup.py -r ${{ matrix.repos }}