This repository has been archived on 2021-06-21. You can view files and clone it, but cannot push or open issues or pull requests.
fbrinker-tileboard/check-master-for-changes.sh
akloeckner 6595011075 feature: nightly and dev images (#5)
So, here we go with a PR for the nightly images. **They will need to have a nightly (at least) run of the pipeline.**

I have also included a script and modifications to `drone.yml`, which I believe should serve well as a check-for-changes. But I have no way to check this in your drone environment. ~~And I have not (yet) checked it locally, either. I just copied things over from my GitHub setup.~~ (Update: The script works for me locally.)

Could you have a look and let me know, what needs to be changed from your point of view?

(I don't know Gitea too well... If there's an option to let you write into this feature branch, I'll enable it.)

fixes #4

Co-authored-by: dev-docker <akloeckner@users.noreply.github.com>
Co-authored-by: Florian Brinker <mail+gitlab@f-brinker.de>
Reviewed-on: fbrinker/docker-tileboard#5
Co-authored-by: akloeckner <akloeckner@noreply.example.org>
Co-committed-by: akloeckner <akloeckner@noreply.example.org>
2021-05-10 19:23:50 +00:00

13 lines
506 B
Bash
Executable File

#!/usr/bin/env bash
commitdate=$(curl -sL "https://api.github.com/repos/resoai/TileBoard/commits/master" | jq -r ".commit.author.date")
commitdays=$(( ( $(date --utc +%s) - $(date --utc -d $commitdate +%s) ) / 86400 ))
echo "Last commit was $commitdays days ago."
if [ $commitdays -lt 2 ] ; then
echo "There ARE recent changes in the repository."
else
echo "There are NO recent changes in the repository."
echo "Aborting pipeline."
exit 78 # drone.io exit code to stop but success the pipeline
fi