-
Notifications
You must be signed in to change notification settings - Fork 20
83 lines (82 loc) · 2.66 KB
/
pr-actions.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: prnet-actions
on:
pull_request:
types: [opened,reopened]
issue_comment:
types: [created]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: khan/pull-request-comment-trigger@master
id: check
with:
trigger: '/deploy'
- uses: actions/checkout@v1
if: steps.check.outputs.triggered == 'true'
- name: GitHub API Request
id: request
uses: octokit/[email protected]
with:
route: ${{ github.event.issue.pull_request.url }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: steps.check.outputs.triggered == 'true'
- uses: ./.github/actions/prnet
id: trigger
with:
action: 'deploy_prnet'
circleci_slug: 'gh/Taraxa-project/taraxa-node'
circle_token: '${{ secrets.CIRCLE_TOKEN }}'
pull_request: '${{ steps.request.outputs.data }}'
if: steps.check.outputs.triggered == 'true'
redeploy:
runs-on: ubuntu-latest
steps:
- uses: khan/pull-request-comment-trigger@master
id: check
with:
trigger: '/redeploy'
- uses: actions/checkout@v1
if: steps.check.outputs.triggered == 'true'
- name: GitHub API Request
id: request
uses: octokit/[email protected]
with:
route: ${{ github.event.issue.pull_request.url }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: steps.check.outputs.triggered == 'true'
- uses: ./.github/actions/prnet
id: trigger
with:
action: 'redeploy_prnet'
circleci_slug: 'gh/Taraxa-project/taraxa-node'
circle_token: '${{ secrets.CIRCLE_TOKEN }}'
pull_request: '${{ steps.request.outputs.data }}'
if: steps.check.outputs.triggered == 'true'
cleanup:
runs-on: ubuntu-latest
steps:
- uses: khan/pull-request-comment-trigger@master
id: check
with:
trigger: '/cleanup'
- uses: actions/checkout@v1
if: steps.check.outputs.triggered == 'true'
- name: GitHub API Request
id: request
uses: octokit/[email protected]
with:
route: ${{ github.event.issue.pull_request.url }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: steps.check.outputs.triggered == 'true'
- uses: ./.github/actions/prnet
id: trigger
with:
action: 'cleanup_prnet'
circleci_slug: 'gh/Taraxa-project/taraxa-node'
circle_token: '${{ secrets.CIRCLE_TOKEN }}'
pull_request: '${{ steps.request.outputs.data }}'
if: steps.check.outputs.triggered == 'true'