File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Sync/Rebase on Upstream
2+ on :
3+ schedule :
4+ - cron : " 0 0 * * *" # run daily
5+ workflow_dispatch : # run manually
6+
7+ permissions :
8+ contents : write
9+
10+ jobs :
11+ sync :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@master
15+ with :
16+ fetch-depth : 0 # Fetch all history for rebase
17+ - name : Get initial hash
18+ id : get-initial-hash
19+ run : echo "init_hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
20+ - uses : archiemeng/rebase-upstream-action@master
21+ with :
22+ branch : ${{ github.ref_name }}
23+ depth : 0
24+ - name : Get current hash
25+ id : get-current-hash
26+ run : echo "cur_hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
27+ - name : Workflow Dispatch
28+ uses : benc-uk/workflow-dispatch@v1.2.4
29+ if : ${{ steps.get-initial-hash.outputs.init_hash != steps.get-current-hash.outputs.cur_hash && hashFiles('.github/workflows/build.yml') != '' }}
30+ with :
31+ workflow : build.yml
You can’t perform that action at this time.
0 commit comments