[EASI-4645] send emails #3
Workflow file for this run
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
name: Teardown branch environment in EKS on PR close | |
on: | |
pull_request: | |
types: [closed] | |
permissions: | |
id-token: write | |
contents: read | |
env: | |
GIT_HASH: ${{ github.sha }} | |
GIT_REF_NAME: ${{ github.ref }} | |
PR_NUMBER: ${{ github.event.number }} | |
jobs: | |
Teardown_env: | |
name: Teardown EKS branch environment | |
runs-on: ubuntu-latest | |
environment: "dev" | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Configure AWS credentials | |
uses: aws-actions/[email protected] | |
with: | |
role-to-assume: ${{ secrets.AWS_OIDC_ROLE_TO_ASSUME }} | |
aws-region: us-west-2 | |
- name: Update kubeconfig | |
run: aws eks update-kubeconfig --name dev-easi-poc-cluster --region us-west-2 | |
- name: Teardown branch environment | |
# The "easi-pr-" prefix needs to match the prefix in build_and_test.yml so that we delete the correct namespace | |
run: | | |
kubectl delete namespace "easi-$PR_NUMBER" --force --ignore-not-found |