-
Notifications
You must be signed in to change notification settings - Fork 20
45 lines (39 loc) · 1.73 KB
/
deploy-review-app.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
40
41
42
43
44
45
name: Deploy Review App
on:
pull_request:
types: [ opened, closed, synchronize ]
# workflows don't support env
# so values are duplicated
jobs:
create_review_app:
if: (github.event_name == 'pull_request' && github.event.action == 'opened' || github.event.action == 'synchronize') && contains(github.event.pull_request.labels.*.name, 'Launch Environment')
uses: moderntribe/actions/.github/workflows/create-review-app.yml@v1
with:
app_name: sq1
pr_number: ${{ github.event.number }}
secrets:
github_pat_token: ${{ secrets.GH_BOT_TOKEN }}
server: ${{ secrets.TEST_DOMAIN }}
ssh_private_key: ${{ secrets.DOKKU_DEPLOY_KEY }}
deploy_review_app:
if: (github.event_name == 'pull_request' && github.event.action == 'opened' || github.event.action == 'synchronize') && contains(github.event.pull_request.labels.*.name, 'Launch Environment')
uses: moderntribe/square-one/.github/workflows/dokku-deploy.yml@main
with:
app_name: sq1
branch: ${{ github.event.pull_request.head.ref }}
pr_number: ${{ github.event.number }}
is_review_app: true
secrets:
github_pat_token: ${{ secrets.GH_BOT_TOKEN }}
server: ${{ secrets.TEST_DOMAIN }}
ssh_private_key: ${{ secrets.DOKKU_DEPLOY_KEY }}
slack_webhook: ${{ secrets.SLACK_WEBHOOK }}
destroy_review_app:
if: (github.event_name == 'pull_request' && github.event.action == 'closed') && contains(github.event.pull_request.labels.*.name, 'Launch Environment')
uses: moderntribe/actions/.github/workflows/delete-review-app.yml@v1
with:
app_name: sq1
pr_number: ${{ github.event.number }}
secrets:
github_pat_token: ${{ secrets.GH_BOT_TOKEN }}
server: ${{ secrets.TEST_DOMAIN }}