This commit is contained in:
Executable
+31
@@ -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
|
||||
Reference in New Issue
Block a user