-
Notifications
You must be signed in to change notification settings - Fork 12
34 lines (34 loc) · 1.27 KB
/
automerge.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
# This workflow executes the automerge python script to automatically merge
# changes from the `main` branch of upstream LLVM into the `arm-software`
# branch of the arm/arm-toolchain repository.
name: Automerge
on:
workflow_run:
workflows: [Sync from Upstream LLVM]
types:
- completed
workflow_dispatch:
jobs:
Run-Automerge:
runs-on: ubuntu-latest
env:
FROM_BRANCH: main
TO_BRANCH: arm-software
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ env.TO_BRANCH }}
- name: Configure Git Identity
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Fetch Branches
run: |
git remote set-branches --add origin ${{ env.FROM_BRANCH }}
git fetch origin ${{ env.FROM_BRANCH }}:${{ env.FROM_BRANCH }}
git fetch origin --update-head-ok --unshallow ${{ env.TO_BRANCH }}:${{ env.TO_BRANCH }}
- name: Run automerge
run: python3 arm-software/ci/automerge.py --project-name ${{ github.repository }} --from-branch ${{ env.FROM_BRANCH }} --to-branch ${{ env.TO_BRANCH }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}