This repository has been archived by the owner on Aug 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
79 lines (78 loc) · 3.03 KB
/
chain-docs.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
name: chain-docs
on:
pull_request:
branches: [ master ]
push:
branches: [ master ]
jobs:
scan:
name: Scan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Perform ShiftLeft Scan
uses: ShiftLeftSecurity/scan-action@master
env:
WORKSPACE: ""
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCAN_AUTO_BUILD: true
with:
output: reports
# Scan auto-detects the languages in your project. To override uncomment the below variable and set the type
# type: credscan,java
# type: python
- name: Upload report
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: reports
build:
name: Build
runs-on: ubuntu-latest
needs: scan
if: github.event_name == 'push' || (github.event.comment.body == '/staging' && (github.actor == 'allthatjazzleo' || github.actor == 'tomtau' || github.actor == 'lezzokafka' || github.actor == 'yihuang' || github.actor == 'calvinaco' || github.actor == 'landanhu' || github.actor == 'devashishdxt' || github.actor == 'leejw51crypto' || github.actor == 'cdc-Hitesh'))
steps:
- name: Github API Request
id: request
uses: octokit/[email protected]
if: github.event_name == 'issue_comment'
with:
route: ${{ github.event.issue.pull_request.url }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get PR informations
id: pr_data
if: github.event_name == 'issue_comment'
run: |
echo "::set-output name=branch::${{ fromJson(steps.request.outputs.data).head.ref }}"
echo "::set-output name=repo_name::${{ fromJson(steps.request.outputs.data).head.repo.full_name }}"
- name: Checkout PR Branch
uses: actions/checkout@v2
if: github.event_name == 'issue_comment'
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ steps.pr_data.outputs.repo_name }}
ref: ${{ steps.pr_data.outputs.branch }}
- name: Check MASTER code
uses: actions/checkout@v2
if: github.event_name == 'push'
- uses: actions/setup-node@v1
with:
node-version: '12'
- name: ci
env:
MASTER_AWS_ACCESS_KEY_ID: ${{ secrets.MASTER_AWS_ACCESS_KEY_ID }}
MASTER_AWS_SECRET_ACCESS_KEY: ${{ secrets.MASTER_AWS_SECRET_ACCESS_KEY }}
MASTER_BUCKET_NAME: ${{ secrets.MASTER_BUCKET_NAME }}
MASTER_CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.MASTER_CLOUDFRONT_DISTRIBUTION_ID }}
MASTER_REGION: ${{ secrets.MASTER_REGION }}
EVENT: ${{ github.event_name }}
STAGING_AWS_ACCESS_KEY_ID: ${{ secrets.STAGING_AWS_ACCESS_KEY_ID }}
STAGING_AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGING_AWS_SECRET_ACCESS_KEY }}
STAGING_BUCKET_NAME: ${{ secrets.STAGING_BUCKET_NAME }}
STAGING_CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.STAGING_CLOUDFRONT_DISTRIBUTION_ID }}
STAGING_REGION: ${{ secrets.STAGING_REGION }}
run: |
. ci/scripts/prepare
ci/scripts/build
ci/scripts/deploy