Skip to content

Commit dc3f685

Browse files
RobotRobot
authored andcommitted
Update script
1 parent e736dac commit dc3f685

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/update.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Update to Upstream
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
schedule:
9+
- cron: "*/30 * * * *"
10+
11+
jobs:
12+
build:
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: configure
19+
run: |
20+
git config --global user.name 'Robot'
21+
git config --global user.email 'robot@oreply.github.com'
22+
# "git checkout main" is unnecessary, already here by default
23+
git pull --unshallow # this option is very important, you would get
24+
# complains about unrelated histories without it.
25+
# (but actions/checkout@v2 can also be instructed
26+
# to fetch all git depth right from the start)
27+
git remote add upstream https://fuchsia.googlesource.com/fuchsia/
28+
git fetch upstream
29+
30+
git checkout main
31+
git rebase upstream/main && git push -f origin main

0 commit comments

Comments
 (0)