-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (68 loc) · 2.69 KB
/
qa-deploy-scheduler.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
name: QA Deployment Scheduler
on:
issue_comment:
types: [created]
jobs:
pre-check:
runs-on: ubuntu-latest
if: (contains(github.event.comment.body, '/e2e-deploy') || contains(github.event.comment.body, '/qa-deploy'))
outputs:
codeowners: ${{ steps.codeowners.outputs.content }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Read codeowners
id: codeowners
uses: juliangruber/read-file-action@v1
with:
path: .github/CODEOWNERS
check-codeowners:
runs-on: ubuntu-latest
needs: [pre-check]
if: (!contains(needs.pre-check.outputs.codeowners, github.event.comment.user.login))
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create Version Comment
uses: peter-evans/create-or-update-comment@v2
with:
issue-number: ${{ github.event.issue.number }}
comment-id: ${{ github.event.comment.id }}
body: |
++++++
Deployment request denied. Please ensure you have the necessary permissions by contacting the project code owners.
reactions: rocket
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
dcellar-web-ui-e2e-deploy-with-qa:
needs: [pre-check]
if: (contains(needs.pre-check.outputs.codeowners, github.event.comment.user.login) && ((github.event.comment.body == '/e2e-deploy:dcellar-web-ui') || (github.event.comment.body == '/e2e-deploy-qa:dcellar-web-ui')))
uses: node-real/dcellar/.github/workflows/dcellar-web-ui-e2e-cicd.yml@main
secrets: inherit
with:
app_name: dcellar-web-ui
env: qa
dcellar-web-ui-e2e-deploy-with-testnet:
needs: [pre-check]
if: (contains(needs.pre-check.outputs.codeowners, github.event.comment.user.login) && (github.event.comment.body == '/e2e-deploy-testnet:dcellar-web-ui'))
uses: node-real/dcellar/.github/workflows/dcellar-web-ui-e2e-cicd.yml@main
secrets: inherit
with:
app_name: dcellar-web-ui
env: testnet
dcellar-web-ui-e2e-deploy-with-mainnet:
needs: [pre-check]
if: (contains(needs.pre-check.outputs.codeowners, github.event.comment.user.login) && (github.event.comment.body == '/e2e-deploy-mainnet:dcellar-web-ui'))
uses: node-real/dcellar/.github/workflows/dcellar-web-ui-e2e-cicd.yml@main
secrets: inherit
with:
app_name: dcellar-web-ui
env: mainnet
dcellar-web-ui-qa-deploy:
needs: [pre-check]
if: (contains(needs.pre-check.outputs.codeowners, github.event.comment.user.login) && (github.event.comment.body == '/qa-deploy:dcellar-web-ui'))
uses: node-real/dcellar/.github/workflows/dcellar-web-ui-qa-cicd.yml@main
secrets: inherit
with:
app_name: dcellar-web-ui
env: qa