Skip to content

Commit 352bd26

Browse files
Merge pull request #52 from oneflow/chore/update-security-monitor-action-workflow
chore: update security monitor action workflows
2 parents 6b88a0d + 4506ca7 commit 352bd26

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed
Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
name: Security Monitor GitHub Action
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
types:
66
- opened
77
- reopened
88
- synchronize
9-
- review_requested
109
- edited
1110
branches:
1211
- "*"
1312

14-
concurrency: security-monitor
15-
1613
jobs:
1714
security_monitor:
15+
if: ${{ !contains(github.head_ref, 'dependabot') }}
1816
runs-on: ubuntu-latest
1917
name: Security Monitor
2018
steps:
@@ -23,3 +21,23 @@ jobs:
2321
with:
2422
gh-pat: ${{ secrets.security_monitor }} # github personal access token
2523
action-user: ${{ secrets.security_monitor_user }}
24+
25+
pass_dependabot_status:
26+
if: ${{ contains(github.head_ref, 'dependabot') }}
27+
runs-on: ubuntu-latest
28+
permissions:
29+
statuses: write
30+
name: Pass security-monitor status check for dependabot
31+
steps:
32+
- name: pass security-monitor status check for dependabot
33+
uses: actions/github-script@v3
34+
with:
35+
github-token: ${{ secrets.GITHUB_TOKEN }}
36+
script: |
37+
await github.repos.createCommitStatus({
38+
context: 'security-monitor',
39+
owner: context.repo.owner,
40+
repo: context.repo.repo,
41+
sha: context.payload.pull_request.head.sha,
42+
state: 'success'
43+
});

0 commit comments

Comments
 (0)