Browse Source

set dry-run false and use schedule trigger

Matthew R Kasun 3 years ago
parent
commit
25ad3a8d63
1 changed files with 5 additions and 4 deletions
  1. 5 4
      .github/workflows/purgeGHCR.yml

+ 5 - 4
.github/workflows/purgeGHCR.yml

@@ -1,8 +1,9 @@
 name: Purge untagged images from GHCR
 name: Purge untagged images from GHCR
 
 
 on: 
 on: 
-    workflow_dispatch
-
+    workflow_dispatch:
+    schedule:
+      - cron: '1 1 1 * *'
 jobs:
 jobs:
   purge:
   purge:
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
@@ -15,7 +16,7 @@ jobs:
           token: ${{ secrets.GITHUB_TOKEN }}
           token: ${{ secrets.GITHUB_TOKEN }}
           organization: gravitl
           organization: gravitl
           container: netmaker
           container: netmaker
-          dry-run: true # Dry-run first, then change to `false`
+          dry-run: false # Dry-run first, then change to `false`
           untagged: true
           untagged: true
       - name: Prune Netclient
       - name: Prune Netclient
         uses: vlaurin/action-ghcr-prune@main
         uses: vlaurin/action-ghcr-prune@main
@@ -23,6 +24,6 @@ jobs:
           token: ${{ secrets.GITHUB_TOKEN }}
           token: ${{ secrets.GITHUB_TOKEN }}
           organization: gravitl
           organization: gravitl
           container: netclient
           container: netclient
-          dry-run: true # Dry-run first, then change to `false`
+          dry-run: false # Dry-run first, then change to `false`
           untagged: true
           untagged: true