mirror of
https://github.com/terrapkg/packages.git
synced 2026-06-01 17:32:18 +00:00
14b9b60ff2
Signed-off-by: madomado <wboy111@outlook.com>
40 lines
1.2 KiB
YAML
40 lines
1.2 KiB
YAML
name: Sync PR to other branches
|
|
on:
|
|
pull_request:
|
|
types:
|
|
- closed
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
sync:
|
|
if: github.event.pull_request.merged == true
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install SSH key
|
|
run: |
|
|
mkdir -p ${{ runner.temp }}
|
|
echo "${{ secrets.SSH_SIGNING_KEY }}" > ${{ runner.temp }}/signing_key
|
|
chmod 0700 ${{ runner.temp }}/signing_key
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
ssh-key: ${{ secrets.SSH_AUTHENTICATION_KEY }}
|
|
- name: Setup Git
|
|
run: |
|
|
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
|
git config user.name "Raboneko"
|
|
git config user.email "raboneko@fyralabs.com"
|
|
git config gpg.format "ssh"
|
|
git config user.signingkey "${{ runner.temp }}/signing_key"
|
|
- name: Download patches
|
|
run: |
|
|
curl https://github.com/terrapkg/packages/pull/${{ github.event.pull_request.number }}.patch > pr.patch
|
|
- name: Apply patches
|
|
run: |
|
|
git checkout f38
|
|
git am --keep-cr --signoff < pr.patch
|
|
- name: Push
|
|
run: git push origin -u --all
|