Browse Source

Merge pull request #845 from gravitl/worklows

New Worklow
dcarns 3 years ago
parent
commit
6724e1226d
1 changed files with 28 additions and 0 deletions
  1. 28 0
      .github/workflows/purgeGHCR.yml

+ 28 - 0
.github/workflows/purgeGHCR.yml

@@ -0,0 +1,28 @@
+name: Purge untagged images from GHCR
+
+on: 
+    workflow_dispatch
+
+jobs:
+  purge:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v2
+      - name: Prune Netmaker
+        uses: vlaurin/action-ghcr-prune@main
+        with:
+          token: ${{ secrets.GITHUB_TOKEN }}
+          organization: gravitl
+          container: netmaker
+          dry-run: true # Dry-run first, then change to `false`
+          untagged: true
+      - name: Prune Netclient
+        uses: vlaurin/action-ghcr-prune@main
+        with:
+          token: ${{ secrets.GITHUB_TOKEN }}
+          organization: gravitl
+          container: netclient
+          dry-run: true # Dry-run first, then change to `false`
+          untagged: true
+