-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (28 loc) · 942 Bytes
/
merge.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
name: 'Amplify PR Closed'
on:
pull_request:
branches:
- dev
types: [closed]
jobs:
deploy:
if: contains(github.event.pull_request.labels.*.name, 'Ready for review')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: set branchname env
id: setenvname
run: |
# use GITHUB_HEAD_REF that is set to PR source branch
echo "##[set-output name=setbranchname;]$(echo ${GITHUB_HEAD_REF})"
- name: cleanup PR preview branch
uses: yinlinchen/amplify-preview-actions@master
with:
branch_name: ${{ steps.setenvname.outputs.setbranchname }}
amplify_command: delete
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AmplifyAppId: ${{ secrets.AmplifyAppId }}
BackendEnvARN: ${{ secrets.BackendEnvARN }}
AWS_REGION: 'us-east-1'