Skip to content

Commit 3d7c2a6

Browse files
pexcngithub-actions[bot]
authored andcommitted
ci: automate rebasing fork onto upstream
1 parent eb4233a commit 3d7c2a6

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Rebase upstream
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "30 3 * * *"
7+
timezone: "Asia/Taipei"
8+
9+
permissions:
10+
contents: write
11+
12+
concurrency:
13+
group: rebase-upstream
14+
cancel-in-progress: false
15+
16+
jobs:
17+
sync:
18+
runs-on: ubuntu-24.04
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v7
22+
with:
23+
ref: main
24+
fetch-depth: 0
25+
ssh-key: ${{ secrets.SSH_KEY }}
26+
- name: Rebase upstream
27+
run: |
28+
set -e
29+
git config user.name "github-actions[bot]"
30+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
31+
git remote add upstream https://github.com/docker/github-builder.git
32+
git fetch upstream main
33+
git rebase upstream/main
34+
git push origin HEAD:main --force-with-lease

0 commit comments

Comments
 (0)