mirror of
https://github.com/NeoCloud/NeoNetwork
synced 2024-11-24 11:20:40 +08:00
test-your-pr: fix bot comment: execute on pull_request_target and hardening [skip ci]
Signed-off-by: Jerry <isjerryxiao@outlook.com>
This commit is contained in:
parent
345cef1fb2
commit
fdd718cd22
1 changed files with 19 additions and 3 deletions
22
.github/workflows/test-your-pr.yml
vendored
22
.github/workflows/test-your-pr.yml
vendored
|
@ -1,7 +1,7 @@
|
||||||
name: Test Your PR
|
name: Test Your PR
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request_target:
|
||||||
branches: [master]
|
branches: [master]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -13,11 +13,27 @@ jobs:
|
||||||
generate_roa: ${{ steps.generate_roa.outputs.base64 }}
|
generate_roa: ${{ steps.generate_roa.outputs.base64 }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: master
|
||||||
|
path: trusted_master_head
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
git remote add trusted trusted_master_head
|
||||||
|
git fetch trusted
|
||||||
|
# you shall not change this
|
||||||
|
git diff --exit-code --name-status trusted/master ${{github.event.pull_request.head.sha}} ./scripts
|
||||||
|
# just in case
|
||||||
|
rm -rf scripts && cp -a trusted_master_head/scripts ./
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: NeoCloud/NeoNetwork-ROA
|
repository: NeoCloud/NeoNetwork-ROA
|
||||||
path: generated
|
path: generated
|
||||||
|
|
Loading…
Reference in a new issue