Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/pr-cleanup.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Cleanup PR deployment and image
name: pr-cleanup
on:
pull_request:
types: closed
Expand Down Expand Up @@ -35,14 +35,14 @@ jobs:

- name: Set up kubeconfig
run: |
set -euxo pipefail
set -euo pipefail
mkdir -p ~/.kube
echo "${{ secrets.PR_DEPLOYMENTS_KUBECONFIG }}" > ~/.kube/config
export KUBECONFIG=~/.kube/config

- name: Delete helm release
run: |
set -euxo pipefail
set -euo pipefail
helm delete --namespace "pr${{ steps.pr_number.outputs.PR_NUMBER }}" "pr${{ steps.pr_number.outputs.PR_NUMBER }}" || echo "helm release not found"

- name: "Remove PR namespace"
Expand All @@ -51,7 +51,7 @@ jobs:

- name: "Remove DNS records"
run: |
set -euxo pipefail
set -euo pipefail
# Get identifier for the record
record_id=$(curl -X GET "https://api.cloudflare.com/client/v4/zones/${{ secrets.PR_DEPLOYMENTS_ZONE_ID }}/dns_records?name=%2A.pr${{ steps.pr_number.outputs.PR_NUMBER }}.${{ secrets.PR_DEPLOYMENTS_DOMAIN }}" \
-H "Authorization: Bearer ${{ secrets.PR_DEPLOYMENTS_CLOUDFLARE_API_TOKEN }}" \
Expand Down