-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (41 loc) · 1.78 KB
/
dokku-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
46
47
name: Dokku Deploy Review App
on:
workflow_dispatch:
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: moose-dev
pr_number: ${{ github.event.number }}
secrets:
github_pat_token: ${{ secrets.GH_BOT_TOKEN }}
server: d1.moderntribe.qa
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: ./.github/workflows/pipeline-dokku.yml
with:
app_name: moose-dev
branch: ${{ github.event.pull_request.head.ref }}
pr_number: ${{ github.event.number }}
is_review_app: true
server: d1.moderntribe.qa
secrets:
github_pat_token: ${{ secrets.GH_BOT_TOKEN }}
ssh_private_key: ${{ secrets.DOKKU_DEPLOY_KEY }}
slack_webhook: ${{ secrets.SLACK_WEBHOOK }}
composer_auth_json: ${{ secrets.COMPOSER_AUTH_JSON }}
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: moose-dev
pr_number: ${{ github.event.number }}
secrets:
github_pat_token: ${{ secrets.GH_BOT_TOKEN }}
server: d1.moderntribe.qa