Files
Michel df68d496dd
automatically check for updates / Check_for_update (push) Successful in 18s
Update .gitea/workflows/update.yaml
2025-05-16 22:02:13 +00:00

32 lines
1.0 KiB
YAML
Executable File

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 -O argonfanhat.sh
rm -f argonfanhat.sh.*
wget https://download.argon40.com/ar1config.png -O ar1config.png
rm -f ar1config.png.*
wget http://download.argon40.com/ar1uninstall.png -O 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