File tree Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 3232 MERGE_ARGS : " "
3333 # Optional push arguments
3434 PUSH_ARGS : " "
35+ # Optional toggle to spawn time logs (keeps action active)
36+ SPAWN_LOGS : " false" # "true" or "false"
3537
3638# This runs every day on 1801 UTC
3739on :
Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ inputs:
2929 description : Git push arguments
3030 required : false
3131 default : " "
32+ spawn_logs :
33+ description : Toggle to spawn `sync-upstream-repo` with time logs
34+ required : true
35+ default : false
3236
3337runs :
3438 using : " docker"
4145 - ${{ inputs.fetch_args }}
4246 - ${{ inputs.merge_args }}
4347 - ${{ inputs.push_args }}
48+ - ${{ inputs.spawn_logs }}
4449
4550branding :
4651 icon : " git-merge"
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ GITHUB_TOKEN=$4
99FETCH_ARGS=$5
1010MERGE_ARGS=$6
1111PUSH_ARGS=$7
12+ SPAWN_LOGS=$8
1213
1314if [[ -z " $UPSTREAM_REPO " ]]; then
1415 echo " Missing \$ UPSTREAM_REPO"
@@ -42,10 +43,15 @@ git remote -v
4243
4344git checkout ${DOWNSTREAM_BRANCH}
4445
45- echo -n " sync-upstream-repo https://github.com/dabreadman/sync-upstream-repo keeping CI alive. UNIX Time: " >> sync-upstream-repo
46- date +" %s" >> sync-upstream-repo
47- git add sync-upstream-repo
48- git commit sync-upstream-repo -m " Syncing upstream"
46+ case ${SPAWN_LOGS} in
47+ (true) echo -n " sync-upstream-repo https://github.com/dabreadman/sync-upstream-repo keeping CI alive." \
48+ " UNIX Time: " >> sync-upstream-repo
49+ date +" %s" >> sync-upstream-repo
50+ git add sync-upstream-repo
51+ git commit sync-upstream-repo -m " Syncing upstream"
52+ (false) echo " Not spawning time logs"
53+ esac
54+
4955git push origin
5056
5157MERGE_RESULT=$( git merge ${MERGE_ARGS} upstream/${UPSTREAM_BRANCH} )
You can’t perform that action at this time.
0 commit comments