Skip to content

Commit dae82bd

Browse files
committed
only delete certificate if PR is merged
This will prevent deleting the certificate for a PR if its is closed by stale bot and may be opened again.
1 parent 384ff98 commit dae82bd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.github/workflows/pr-cleanup.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ jobs:
6767
) || echo "DNS record not found"
6868
6969
- name: "Delete certificate"
70+
if: ${{ github.event.pull_request.merged == true }}
7071
run: |
7172
set -euxo pipefail
7273
kuebctl delete certificate "pr${{ steps.pr_number.outputs.PR_NUMBER }}-tls" -n pr-deployment-certs || echo "certificate not found"

0 commit comments

Comments
 (0)