feat(ci/security): add paths for pull_request event trigger

pull/4790/head
oscarzhou 2022-04-27 20:33:52 +12:00
parent 67f30b3b3a
commit 7122ba3cdc
2 changed files with 13 additions and 7 deletions

View File

@ -101,10 +101,10 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@master uses: actions/checkout@master
- name: Use golang 1.17.x - name: Use golang 1.18
uses: actions/setup-go@v3 uses: actions/setup-go@v3
with: with:
go-version: '>=1.17.0' go-version: '1.18'
- name: Use Node.js 12.x - name: Use Node.js 12.x
uses: actions/setup-node@v1 uses: actions/setup-node@v1
@ -195,7 +195,7 @@ jobs:
"type": "section", "type": "section",
"text": { "text": {
"type": "mrkdwn", "type": "mrkdwn",
"text": "Code Scanning Result (*${{ github.event.repository.name}}*)\n*<${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }}|GitHub Actions Workflow URL>*" "text": "Code Scanning Result (*${{ github.repository }}*)\n*<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|GitHub Actions Workflow URL>*"
} }
}, },
{ {

View File

@ -1,8 +1,14 @@
name: PR Code Security Scan name: PR Code Security Scan
on: on:
pull_request_review: pull_request:
types: [edited, submitted] paths:
- 'package.json'
- 'api/go.mod'
- 'gruntfile.js'
- 'build/linux/Dockerfile'
- 'build/linux/alpine.Dockerfile'
- 'build/windows/Dockerfile'
workflow_dispatch: workflow_dispatch:
jobs: jobs:
@ -125,10 +131,10 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@master uses: actions/checkout@master
- name: Use golang 1.17.x - name: Use golang 1.18
uses: actions/setup-go@v3 uses: actions/setup-go@v3
with: with:
go-version: '>=1.17.0' go-version: '1.18'
- name: Use Node.js 12.x - name: Use Node.js 12.x
uses: actions/setup-node@v1 uses: actions/setup-node@v1