feat(ci): update workflows

This commit is contained in:
windowsboy111
2023-04-16 17:31:25 +08:00
parent 7330396e43
commit b1de557a1e
6 changed files with 54 additions and 19 deletions
+9 -11
View File
@@ -4,10 +4,13 @@ on:
types:
- closed
branches:
- main
- 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:
@@ -16,23 +19,18 @@ jobs:
with:
fetch-depth: 0
ssh-key: ${{ secrets.SSH_AUTHENTICATION_KEY }}
- name: Install SSH 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
- 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
- name: Apply patches and Push
run: |
git checkout f38
git am -S --keep-cr --signoff < pr.patch
- name: Push
run: git push -u origin --all
git am -S --keep-cr --signoff < curl https://github.com/terrapkg/packages/pull/${{ github.event.pull_request.number }}.patch
git push -u origin --all