mirror of
https://github.com/lineageos4microg/docker-lineage-cicd
synced 2024-11-09 10:09:56 +01:00
Add "now" option
This commit is contained in:
parent
fd59136e29
commit
b235a6e245
@ -40,6 +40,7 @@ ENV CLEAN_OUTDIR true
|
||||
|
||||
# Change this cron rule to what fits best for you
|
||||
# By Default = At 10:00 UTC ~ 2am PST/PDT
|
||||
# Use 'now' to start the build immediately
|
||||
ENV CRONTAB_TIME '0 10 * * *'
|
||||
|
||||
# Print detailed output rather than only summary
|
||||
|
@ -19,6 +19,9 @@ fi
|
||||
git config --global user.name $USER_NAME
|
||||
git config --global user.email $USER_MAIL
|
||||
|
||||
if [ "$CRONTAB_TIME" = "now" ]; then
|
||||
/usr/bin/flock -n /tmp/lock.build /root/build.sh >> $DOCKER_LOG 2>&1
|
||||
else
|
||||
# Initialize the cronjob
|
||||
cronFile=/tmp/buildcron
|
||||
printf "SHELL=/bin/bash\n" > $cronFile
|
||||
@ -29,3 +32,4 @@ rm $cronFile
|
||||
|
||||
# Run crond in foreground
|
||||
crond -n -m off 2>&1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user