forked from PFCCLab/PaddleCppAPITest
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (46 loc) · 1.32 KB
/
check-bypass.yml
File metadata and controls
47 lines (46 loc) · 1.32 KB
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
on:
workflow_call:
inputs:
workflow-name:
required: true
type: string
secrets:
github-token:
required: true
outputs:
can-skip:
description: "Whether the workflow can be skipped."
value: ${{ jobs.check-bypass.outputs.can-skip }}
jobs:
check-bypass:
name: Check bypass
runs-on: ubuntu-latest
permissions:
contents: read
env:
CI_TEAM_MEMBERS: '["SigureMo", "BingooYang", "yongqiangma"]'
outputs:
can-skip: ${{ steps.check-bypass.outputs.can-skip }}
steps:
- id: check-bypass
name: Check Bypass
uses: PFCCLab/ci-bypass@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
non-pull-request-event-strategy: "never-skipped"
type: "composite"
composite-rule: |
{
"any": [
{
"type": "labeled",
"label": ["skip-ci: ${{ inputs.workflow-name }}", "skip-ci: all"],
"username": ${{ env.CI_TEAM_MEMBERS }}
},
{
"type": "commented",
"comment-pattern": [".*/skip-ci ${{ inputs.workflow-name }}.*", ".*/skip-ci all.*"],
"username": ${{ env.CI_TEAM_MEMBERS }}
}
]
}