-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |