-
Notifications
You must be signed in to change notification settings - Fork 14
39 lines (33 loc) · 1.06 KB
/
clean-up-pr.yml
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
38
39
name: Clean up PR
on:
pull_request:
types: [closed]
branches:
- master
concurrency:
group: deploy-${{ github.head_ref || github.run_id }}
jobs:
clean-up-pr:
runs-on: ubuntu-latest
env:
STAGING_PREFIX: staging-${{ github.event.pull_request.number }}.
STAGE_NAME: staging-${{ github.event.pull_request.number }}
steps:
- name: Check Out Repo
uses: actions/checkout@v3
- name: Dump Environment Variables
run: |
cd api && printf "STAGING_PREFIX=$STAGING_PREFIX\n \
STAGE_NAME=$STAGE_NAME" > .env
- name: Remove Serverless stack
uses: serverless/[email protected]
with:
args: >
-c "cd api &&
serverless plugin install --name serverless-dotenv-plugin &&
serverless plugin install --name serverless-domain-manager &&
serverless remove"
entrypoint: /bin/sh
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}