-
Notifications
You must be signed in to change notification settings - Fork 12
38 lines (38 loc) · 1.36 KB
/
sync_from_upstream.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
35
36
37
38
# This workflow fetches changes from relevant branches from the
# llvm/llvm-project repository (upstream) into the corresponding branches
# in the arm/arm-toolchain repository (downstream), keeping them in sync.
name: Sync from Upstream LLVM
on:
schedule:
- cron: '0,30 * * * *'
workflow_dispatch:
jobs:
Fetch-Upstream:
runs-on: ubuntu-latest
strategy:
matrix:
branch: [main, release/19.x]
env:
UPSTREAM_REMOTE: https://github.com/llvm/llvm-project.git
steps:
- name: Configure Access Token
uses: actions/create-github-app-token@v1
id: generate-token
with:
app-id: ${{ secrets.SYNC_APP_ID }}
private-key: ${{ secrets.SYNC_APP_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
token: ${{ steps.generate-token.outputs.token }}
- name: Configure Upstream Remote
run: git remote add upstream ${{ env.UPSTREAM_REMOTE }}
- name: Fetch Upstream Changes
run: git pull --ff-only upstream ${{ matrix.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: Push Changes
run: git push origin ${{ matrix.branch }}