-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (59 loc) · 1.81 KB
/
dcellar-web-ui-prod-cicd.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
name: dcellar-web-ui prod CICD
on:
pull_request:
types:
- closed
branches:
- main
workflow_dispatch:
inputs:
project:
description: "release project by manually"
required: true
default: "dcellar-web-ui"
type: string
env:
description: "which env to deploy"
required: true
default: "testnet"
type: string
jobs:
pre-check:
runs-on: ubuntu-latest
if: (github.event.pull_request.merged && (contains(github.event.pull_request.labels.*.name, 'dcellar-web-ui'))) || ((github.event.inputs.project == 'dcellar-web-ui') && (github.event.inputs.env == 'testnet'))
outputs:
codeowners: ${{ steps.codeowners.outputs.content }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- 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@v3
- 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: |
++++++
Please contact codeowners to deploy!
reactions: rocket
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CICD:
needs: [pre-check]
if: (contains(needs.pre-check.outputs.codeowners, github.event.comment.user.login))
uses: node-real/github-workflows/.github/workflows/dcellar-web-ui-prod-cicd.yml@feat/opt-fe/devin
secrets: inherit
with:
app_name: dcellar-web-ui
env: testnet