Skip to content

Commit

Permalink
Create reset_cache.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
almahmoud authored Nov 6, 2024
1 parent bef4706 commit 9409340
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/reset_cache.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Reset all cached images
on:
workflow_dispatch:

jobs:
deletepods:
name: Reset DaemonSet pods
runs-on: ubuntu-latest
steps:
- name: save kubeconfig
shell: bash
run: mkdir -p ~/.kube && echo "${{ secrets.TEST_KUBECONFIG }}" > ~/.kube/config
- name: Install Kubectl
run: curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" && chmod +x ./kubectl && sudo mv ./kubectl /usr/local/bin/kubectl && kubectl version
- name: Delete cache pods
run: |
CACHEPODS=$(kubectl get -o name pods -n cache-gxy)
kubectl delete --wait -n cache-gxy $CACHEPODS

0 comments on commit 9409340

Please sign in to comment.