Skip to content

Commit cf71c88

Browse files
authored
Add handling of release/20.x branch to automerge workflow (#75)
1 parent 6eaff2a commit cf71c88

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

.github/workflows/automerge.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,28 @@ on:
1111
jobs:
1212
Run-Automerge:
1313
runs-on: ubuntu-latest
14-
env:
15-
FROM_BRANCH: main
16-
TO_BRANCH: arm-software
14+
strategy:
15+
matrix:
16+
branches:
17+
- from_branch: main
18+
to_branch: arm-software
19+
- from_branch: release/20.x
20+
to_branch: release/arm-software/20.x
1721
steps:
1822
- name: Checkout
1923
uses: actions/checkout@v4
2024
with:
21-
ref: ${{ env.TO_BRANCH }}
25+
ref: ${{ matrix.branches.to_branch }}
2226
- name: Configure Git Identity
2327
run: |
2428
git config --local user.name "github-actions[bot]"
2529
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
2630
- name: Fetch Branches
2731
run: |
28-
git remote set-branches --add origin ${{ env.FROM_BRANCH }}
29-
git fetch origin ${{ env.FROM_BRANCH }}:${{ env.FROM_BRANCH }}
30-
git fetch origin --update-head-ok --unshallow ${{ env.TO_BRANCH }}:${{ env.TO_BRANCH }}
32+
git remote set-branches --add origin ${{ matrix.branches.from_branch }}
33+
git fetch origin ${{ matrix.branches.from_branch }}:${{ matrix.branches.from_branch }}
34+
git fetch origin --update-head-ok --unshallow ${{ matrix.branches.to_branch }}:${{ matrix.branches.to_branch }}
3135
- name: Run automerge
32-
run: python3 arm-software/ci/automerge.py --project-name ${{ github.repository }} --from-branch ${{ env.FROM_BRANCH }} --to-branch ${{ env.TO_BRANCH }}
36+
run: python3 arm-software/ci/automerge.py --project-name ${{ github.repository }} --from-branch ${{ matrix.branches.from_branch }} --to-branch ${{ matrix.branches.to_branch }}
3337
env:
3438
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)