File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Rebase against upstream
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - master
7+ schedule :
8+ - cron : ' 15 3 * * *'
9+
10+ jobs :
11+ rebase :
12+ name : Rebase now!
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+
18+ - run : |
19+ set -eux
20+
21+ base_branch=release-ci
22+ upstream_repo=https://github.com/haskell/cabal.git
23+ upstream_branch=master
24+
25+ git remote add upstream "${upstream_repo}"
26+ git fetch upstream
27+ common_ancestor=$(git merge-base "${base_branch}" "upstream/${upstream_branch}")
28+ git format-patch "${common_ancestor}".."${base_branch}"
29+ git archive "${base_branch}" > backup.tar
30+ tar -rf backup.tar .git
31+ git am *.patch
32+ git push -f origin master-rebased
33+
34+ - if : always()
35+ name : Upload backup
36+ uses : actions/upload-artifact@v4
37+ with :
38+ if-no-files-found : error
39+ retention-days : 7
40+ name : backup
41+ path : |
42+ ./backup.tar
You can’t perform that action at this time.
0 commit comments