Skip to content

Commit c735912

Browse files
committed
WIP linearize main
Change-Id: If08149432301800c5b057db655258477bb27b9ed
1 parent 6e5ff39 commit c735912

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: linearize_main
2+
3+
on:
4+
schedule:
5+
# GMT timezone.
6+
- cron: '0 10 * * *'
7+
workflow_dispatch:
8+
9+
permissions: read-all
10+
11+
jobs:
12+
trigger_linearize:
13+
# runs-on: ubuntu-latest
14+
runs-on: [self-hosted, chrobalt-linux-runner]
15+
permissions:
16+
contents: write
17+
steps:
18+
- name: Checkout main
19+
uses: actions/checkout@v4
20+
with:
21+
ref: main
22+
fetch-depth: 6
23+
- name: Checkout rebase_tools
24+
uses: actions/checkout@v4
25+
with:
26+
ref: experimental/rebase_tools
27+
- uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.9'
30+
cache: 'pip'
31+
- name: Install rebase_tools
32+
run: |
33+
set -eux
34+
pip install -r requirements.txt
35+
- name: Run linearize
36+
run: |
37+
set -eux
38+
# m114 merge commit=38a06fe8674ad2140ff85c87b5b3a817304e369a
39+
# test merge commit=1c94965e70428e8415ea1b0813ad93a4e6067e81
40+
export REV=$(git rev-parse --verify origin/main)
41+
mkdir "${GITHUB_WORKSPACE}/feature/"
42+
pwd
43+
python main.py linearize --repo-path=${GITHUB_WORKSPACE} --source-branch=main --new-branch-name=feature/linear_main \
44+
--start-commit-ref=1c94965e70428e8415ea1b0813ad93a4e6067e81 --end-commit-ref=${REV}
45+
- name: Commit new commit mapping
46+
run: |
47+
set -eux
48+
git add feature/linear_main_commit_mapping.json
49+
git commit -m "Linearization refresh on $(date +'%Y-%m-%d')."
50+
git push --force origin experimental/rebase_tools
51+
- name: Checkout rebase_tools
52+
uses: actions/checkout@v4
53+
with:
54+
ref: feature/linear_main
55+
- name: Update feature/linear_main
56+
run: |
57+
set -eux
58+
git push --force origin feature/linear_main

0 commit comments

Comments
 (0)