forked from linux-riscv/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (74 loc) · 2.86 KB
/
sync.yml
File metadata and controls
82 lines (74 loc) · 2.86 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: sync
defaults:
run:
shell: bash -leo pipefail {0}
on:
schedule:
- cron: "*/30 * * * *"
workflow_dispatch:
concurrency:
group: ci-test-${{ github.workflow }}-${{ github.ref_name }}
jobs:
sync_repo:
runs-on: ubuntu-latest
container:
image: ghcr.io/linux-riscv/pw-builder:latest
volumes:
- /home/github/ramdisk/build:/build
- /home/github/ccache:/build/ccache
- /home/github/gitref:/build/gitref
steps:
- name: Configure git
run: |
git config --global --add safe.directory '*'
git config --global user.name "Linux RISC-V bot"
git config --global user.email "linux.riscv.bot@gmail.com"
- name: Checkout git
run: |
mkdir -p /build/linux
cd /build/linux
git clone https://github.com/${{ github.repository }} .
git log --oneline -4
- name: Sync Linus master
env:
ACTION_TOKEN: ${{ secrets.ACTION_TOKEN }}
run: |
cd /build/linux
./.github/scripts/sync.sh "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git" master master workflow "https://github.com/linux-riscv/github-ci.git"
- name: Sync RISC-V for-next
env:
ACTION_TOKEN: ${{ secrets.ACTION_TOKEN }}
run: |
cd /build/linux
./.github/scripts/sync.sh "git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git" for-next master__riscv__for-next workflow__riscv__for-next "https://github.com/linux-riscv/github-ci.git"
- name: Sync RISC-V fixes
env:
ACTION_TOKEN: ${{ secrets.ACTION_TOKEN }}
run: |
cd /build/linux
./.github/scripts/sync.sh "git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git" fixes master__riscv__fixes workflow__riscv__fixes "https://github.com/linux-riscv/github-ci.git"
- name: Create and activate virtual environment
run: |
python -m venv venv
source venv/bin/activate
echo "PATH=$PATH" >> $GITHUB_ENV
- name: Install dependencies
run: |
pip install -r /build/linux/.github/scripts/requirements.txt
- name: Sync Patchwork
env:
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}
GIST_TOKEN: ${{ secrets.GIST_TOKEN }}
PATCHWORK_TOKEN: ${{ secrets.PATCHWORK_TOKEN }}
PATCHWORK_USER: ""
EMAIL_TOKEN: ${{ secrets.EMAIL_TOKEN }}
run: |
cd /build/linux
./.github/scripts/sync_patchwork.py -c ./.github/scripts/config.json -s /build/linux -b workflow__riscv__fixes -b workflow__riscv__for-next -b workflow linux-riscv/linux
- name: Clean PRs
env:
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}
GIST_TOKEN: ${{ secrets.GIST_TOKEN }}
run: |
cd /build/linux
./.github/scripts/cleanup_pr.py linux-riscv/linux