Skip to content

Commit 16ad946

Browse files
jmduartethesps
andauthored
Create branch on PR (#636)
* create branch on pr * try to update * try workflow_dispatch * try again * try again * try again * update * try again * try again * update * origin * trigger on please test label Co-authored-by: Sioni Summers <[email protected]>
1 parent e4a5988 commit 16ad946

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
on:
2+
pull_request_target:
3+
types: [labeled]
4+
branches: [main]
5+
6+
name: Update branch on PR from fork
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repo
12+
uses: actions/checkout@v3
13+
if: ${{ github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name && github.event.label.name == 'please test' }}
14+
with:
15+
ref: ${{ github.event.pull_request.head.sha }}
16+
- name: Push changes
17+
if: ${{ github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name && github.event.label.name == 'please test' }}
18+
run: |
19+
git checkout -b pr/${{ github.event.pull_request.number }}
20+
git push --force origin pr/${{ github.event.pull_request.number }}

0 commit comments

Comments
 (0)