Add Gitea workflow
automatically check for updates / Check_for_update (push) Successful in 10s

This commit is contained in:
2023-12-12 18:59:14 +01:00
parent 1fd2f1c990
commit c1e7d446de
+31
View File
@@ -0,0 +1,31 @@
name: automatically check for updates
on:
push:
schedule:
- cron: "0 4 * * 6"
jobs:
Check_for_update:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: update argonfanhat
run: |
wget https://download.argon40.com/argonfanhat.sh
rm -f argonfanhat.sh.*
wget https://download.argon40.com/ar1config.png
rm -f ar1config.png.*
wget http://download.argon40.com/ar1uninstall.png
rm -f ar1uninstall.png.*
- name: git commit
run: |
git config user.name "${{ secrets.GIT_USERNAME }}"
git config user.email "${{ secrets.GIT_USEREMAIL }}"
mtime=$(stat -c "%y" ./argonfanhat.sh)
git add .
export GIT_COMMITTER_DATE=$mtime
export GIT_AUTHOR_DATE=$mtime
version=$(date -d "${mtime}" +%Y-%m-%d)
if [ -n "$(git diff --staged)" ]; then git commit --date "$mtime" -m "update $version" && git push; fi