Improve update.yml

This commit is contained in:
windowsboy111
2022-10-16 19:11:19 +08:00
parent 7452874964
commit afaba869b3
6 changed files with 144 additions and 1 deletions
+36
View File
@@ -0,0 +1,36 @@
# for each folder in ultramarine/
# if there is chkupdate.py
# run it every 2 hours
name: Automatically check for updates
on:
schedule:
- cron: '0 */2 * * *'
workflow_dispatch:
jobs:
get-chkupdate-scripts:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- run: git fetch
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Run Update
run: ./update.sh
- name: Save
run: |
if [[ `git status --porcelain` ]]; then
git config user.name "Package Update Checker"
git config user.email "<>"
git commit -a -m "Automatic Update by chkupdate.py"
git push origin master
fi