sync cloud menus #159
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 UAT environment for this PR | |
on: | |
workflow_dispatch: {} | |
pull_request_target: | |
types: | |
- closed | |
jobs: | |
teardown: | |
if: contains(github.event.pull_request.labels.*.name, 'deploy uat') | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
environment: | |
name: UAT | |
steps: | |
- name: Setup kubectl | |
uses: azure/[email protected] | |
- name: Teardown UAT environment for this PR | |
run: | | |
mkdir $HOME/.kube | |
echo -e "${{ secrets.UAT_KUBECONFIG_ANS }}" > $HOME/.kube/config | |
kubectl -n docs-uat delete ingresses -l 'app.kubernetes.io/instance=docs-uat-${{ github.event.number }}' | |
kubectl -n docs-uat delete services -l 'app.kubernetes.io/instance=docs-uat-${{ github.event.number }}' | |
kubectl -n docs-uat delete deployments -l 'app.kubernetes.io/instance=docs-uat-${{ github.event.number }}' | |
- name: Remove the app container image from the registry | |
uses: bots-house/[email protected] | |
with: | |
owner: ans-group | |
name: docs-app | |
tag: ${{ github.event.number }} | |
token: ${{ secrets.REGISTRY_DELETE_PAT }} | |
- name: Remove the populator container image from the registry | |
uses: bots-house/[email protected] | |
with: | |
owner: ans-group | |
name: docs-populator | |
tag: ${{ github.event.number }} | |
token: ${{ secrets.REGISTRY_DELETE_PAT }} |