Skip to content

ci: implement automatic upgrade of PR deployment #8876

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 33 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
27fe2f4
delete certificate when PR is closed
matifali Aug 3, 2023
f0478ed
add auto deploy
matifali Aug 3, 2023
8247e79
comment always
matifali Aug 3, 2023
4b285cb
fixup! run pn pull request synchronies
matifali Aug 3, 2023
f252386
skip build steps if only ignored files are changed
matifali Aug 3, 2023
488ac0f
fmt
matifali Aug 3, 2023
f10205e
move check files to get_info job
matifali Aug 3, 2023
2055967
update ignored files
matifali Aug 3, 2023
1660a12
add verbosity
matifali Aug 3, 2023
19629ed
more filters
matifali Aug 3, 2023
e7c18ad
test
matifali Aug 3, 2023
77b09cc
test again
matifali Aug 3, 2023
5aedc0d
test build
matifali Aug 3, 2023
081eaa6
Discard changes to go.mod
matifali Aug 3, 2023
c9b2319
Discard changes to go.sum
matifali Aug 3, 2023
683ece7
remove issue_comment trriger
matifali Aug 3, 2023
0b921ae
use new experiments flag if triggered manually
matifali Aug 3, 2023
1b4dca0
fmt
matifali Aug 3, 2023
ac3cbe5
fmt
matifali Aug 3, 2023
02757d3
double lines
matifali Aug 3, 2023
5e9757f
fix link
matifali Aug 3, 2023
eb0b5ce
update reaction too
matifali Aug 3, 2023
397f274
tag actor
matifali Aug 3, 2023
4874f0b
move out of highlight
matifali Aug 3, 2023
f9b6635
update docs
matifali Aug 3, 2023
384ff98
do not redeploy if there is no new build
matifali Aug 3, 2023
dae82bd
only delete certificate if PR is merged
matifali Aug 3, 2023
5babe94
typo
matifali Aug 3, 2023
9a3c21c
fixup!
matifali Aug 3, 2023
4b467a9
we don;t need to parse experiments anymore
matifali Aug 3, 2023
537e456
fix condition
matifali Aug 3, 2023
b35bafc
fix condition
matifali Aug 3, 2023
ccf281e
replace reaction
matifali Aug 3, 2023
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
10 changes: 8 additions & 2 deletions .github/workflows/pr-cleanup.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Cleanup PR deployment and image
on:
pull_request:
types: [closed]
types: closed
workflow_dispatch:
inputs:
pr_number:
Expand Down Expand Up @@ -63,5 +63,11 @@ jobs:
(
curl -X DELETE "https://api.cloudflare.com/client/v4/zones/${{ secrets.PR_DEPLOYMENTS_ZONE_ID }}/dns_records/$record_id" \
-H "Authorization: Bearer ${{ secrets.PR_DEPLOYMENTS_CLOUDFLARE_API_TOKEN }}" \
-H "Content-Type:application/json"
-H "Content-Type:application/json" | jq -r '.success'
) || echo "DNS record not found"

- name: "Delete certificate"
if: ${{ github.event.pull_request.merged == true }}
run: |
set -euxo pipefail
kuebctl delete certificate "pr${{ steps.pr_number.outputs.PR_NUMBER }}-tls" -n pr-deployment-certs || echo "certificate not found"
Loading