summaryrefslogtreecommitdiffstats
path: root/.github/workflows/packagecloud.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/packagecloud.yml')
-rw-r--r--.github/workflows/packagecloud.yml36
1 files changed, 36 insertions, 0 deletions
diff --git a/.github/workflows/packagecloud.yml b/.github/workflows/packagecloud.yml
new file mode 100644
index 000000000..ba70c177b
--- /dev/null
+++ b/.github/workflows/packagecloud.yml
@@ -0,0 +1,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@v3
+ 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 }}