-
Notifications
You must be signed in to change notification settings - Fork 11
34 lines (31 loc) · 1.06 KB
/
delete-pr.yaml
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
name: Delete PR
on:
pull_request:
types: [closed]
jobs:
delete-pr-subns:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
pull-requests: read
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: unfor19/install-aws-cli-action@v1
with:
version: 2
- name: Install kubectl
uses: azure/setup-kubectl@901a10e89ea615cf61f57ac05cecdf23e7de06d8 #v3.2
with:
version: "v1.25.6"
- name: Configure AWS credentials for deployment
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.DEPLOY_PR_IAM_ROLE }}
aws-region: eu-west-2
- name: Delete PR
run: |
aws eks update-kubeconfig --name ${{ secrets.CLUSTER_NAME }} \
--alias ${{ secrets.CLUSTER_NAME }} \
--region eu-west-2
kubectl delete subns radix-dapp-toolkit-pr-${{ github.event.number }} -n radix-dapp-toolkit-ci-pr