-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (29 loc) · 1.06 KB
/
uninstall-helm-chart.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Uninstall Helm Chart
on: workflow_dispatch
jobs:
Uninstall-Helm-Chart:
runs-on: ubuntu-latest
environment: .github/workflows/${GITHUB_REF##*/}
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Kubernetes toolset
uses: stefanprodan/[email protected]
with:
kubectl: 1.23.0
- name: Uninstall Helm Chart
run: |
#configure aws login
if rm -rf /home/runner/.aws
then
echo old credentials removed
fi
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_CICD }}
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY_CICD }}
aws eks update-kubeconfig --region ${{ secrets.AWS_REGION }} --name ${{ secrets.CLUSTER_NAME }}
#Uninstall current Helm Chart
helm uninstall ${{ secrets.INSTANCE_NAME }} helm \
--namespace ${{ secrets.INSTANCE_NAME }}