Skip to content

Commit 474350b

Browse files
authored
Create needs-ci.yml
1 parent f09f971 commit 474350b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/needs-ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: "Needs CI (with secrets)"
2+
on:
3+
pull_request_target:
4+
types: [labeled]
5+
6+
jobs:
7+
privileged-test:
8+
if: ${{ github.event.label.name == 'needs-ci' }}
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout PR code
12+
uses: actions/checkout@v3
13+
with:
14+
# pull_request_target 默认签出当前主仓库的 HEAD,
15+
# 要改成 PR 分支:
16+
ref: ${{ github.event.pull_request.head.sha }}
17+
- name: Show that we have MY_SECRET
18+
run: echo "✅ MY_SECRET is ${{ secrets.MY_SECRET }}"

0 commit comments

Comments
 (0)