ci: Try backporting via pull_request_target (#9430)
* ci: Try backporting via pull_request_target * ci: Security improvements
This commit is contained in:
parent
548cc4fc17
commit
d60771f986
|
@ -1,7 +1,13 @@
|
||||||
name: backport
|
name: backport
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
# Note that `pull_request_target` has security implications:
|
||||||
|
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
|
||||||
|
# In particular:
|
||||||
|
# - Only allow triggers that can be used only be trusted users
|
||||||
|
# - Don't execute any code from the target branch
|
||||||
|
# - Don't use cache
|
||||||
|
pull_request_target:
|
||||||
types: [labeled]
|
types: [labeled]
|
||||||
|
|
||||||
# Set permissions at the job level.
|
# Set permissions at the job level.
|
||||||
|
@ -9,7 +15,7 @@ permissions: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
backport:
|
backport:
|
||||||
if: ${{ startsWith(github.event.label.name, 'backport ') }}
|
if: startsWith(github.event.label.name, 'backport ') && github.event.pull_request.merged
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
Loading…
Reference in New Issue