From cc19abd06d5fc71be74e923cdb63934cb49084d8 Mon Sep 17 00:00:00 2001 From: Lleyton Gray Date: Tue, 2 Apr 2024 06:13:12 +0000 Subject: [PATCH 1/2] ci: add sync/backport action --- .backportrc.json | 8 ++++++++ .github/workflows/sync.yml | 25 +++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 .backportrc.json create mode 100644 .github/workflows/sync.yml diff --git a/.backportrc.json b/.backportrc.json new file mode 100644 index 0000000000..db209de85f --- /dev/null +++ b/.backportrc.json @@ -0,0 +1,8 @@ +{ + "repoOwner": "terrapkg", + "repoName": "packages", + "targetBranchChoices": ["f38", "f39", "f40", "frawhide"], + "branchLabelMapping": { + "^sync-(.+)$": "$1" + } +} diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml new file mode 100644 index 0000000000..556a50c132 --- /dev/null +++ b/.github/workflows/sync.yml @@ -0,0 +1,25 @@ +name: Automatic backport/sync action + +on: + pull_request_target: + types: ["labeled", "closed"] + +jobs: + backport: + name: Backport/sync PR + runs-on: ubuntu-latest + steps: + - name: Backport Action + uses: sorenlouv/backport-github-action@v9.3.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + auto_backport_label_prefix: sync- + + - name: Info log + if: ${{ success() }} + run: cat ~/.backport/backport.info.log + + - name: Debug log + if: ${{ failure() }} + run: cat ~/.backport/backport.debug.log + From d85a426299d2768d6526856dc6ae34b641ea2b99 Mon Sep 17 00:00:00 2001 From: Lleyton Gray Date: Tue, 2 Apr 2024 06:13:41 +0000 Subject: [PATCH 2/2] chore: and delete that too --- .github/workflows/sync.yml.bak | 38 ---------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 .github/workflows/sync.yml.bak diff --git a/.github/workflows/sync.yml.bak b/.github/workflows/sync.yml.bak deleted file mode 100644 index 48f66660ec..0000000000 --- a/.github/workflows/sync.yml.bak +++ /dev/null @@ -1,38 +0,0 @@ -name: Sync PR to other branches -on: - pull_request: - types: - - closed - branches: - - f38 - -jobs: - sync: - strategy: - matrix: - branch: ["f37"] - fail-fast: false - 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 "raboneko@fyralabs.com" - git config gpg.format "ssh" - git config user.signingkey "${{ runner.temp }}/signing_key" - - name: Apply patches and Push - run: | - curl https://github.com/terrapkg/packages/pull/${{ github.event.pull_request.number }}.patch > pr.patch - git am -S --keep-cr --signoff < pr.patch - git push -u origin --all