-
-
Notifications
You must be signed in to change notification settings - Fork 26
36 lines (35 loc) · 1.22 KB
/
sync.yml
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
name: Sync PR to other branches
on:
pull_request:
types:
- closed
branches:
- f39
jobs:
sync:
strategy:
matrix:
branch: ["f37", "f38"]
if: github.event.pull_request.merged == true && !contains(github.event.pull_request.labels.*.name, 'nosync')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ssh-key: ${{ secrets.SSH_AUTHENTICATION_KEY }}
ref: ${{ matrix.branch }}
- name: Install SSH key and Setup Git
run: |
mkdir -p ${{ runner.temp }}
echo "${{ secrets.SSH_SIGNING_KEY }}" > ${{ runner.temp }}/signing_key
chmod 0700 ${{ runner.temp }}/signing_key
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config user.name "Raboneko"
git config user.email "[email protected]"
git config gpg.format "ssh"
git config user.signingkey "${{ runner.temp }}/signing_key"
- name: Apply patches and Push
run: |
git am -S --keep-cr --signoff < curl https://github.com/terrapkg/packages/pull/${{ github.event.pull_request.number }}.patch
git push -u origin --all