-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (35 loc) · 1.06 KB
/
PREview-delete.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: "PREview: Delete"
on:
pull_request:
types: [closed]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: mshick/add-pr-comment@v2
continue-on-error: true
with:
message: |
**Cleaning up PREview environment...**
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-repeats: true
- name: Obtain Bucket Name
uses: ./.github/actions/PREview-data
- name: Authenticate with Google Cloud
uses: "google-github-actions/auth@v2"
with:
credentials_json: "${{secrets.GCP_SERVICE_ACCOUNT}}"
- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v2"
- name: Delete PReview bucket
run: gsutil rm -r gs://${BUCKET}
- uses: mshick/add-pr-comment@v2
if: success()
continue-on-error: true
with:
message: |
**PREview environment deleted.**
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-repeats: true