-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (36 loc) · 1.28 KB
/
auto-update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Auto update
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # Run daily
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Git config
run: |
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
- name: Install Dependencies
run: |
cd auto-update
pip install -r requirements.txt
- name: Run auto update script
run: |
cd auto-update
python main.py
- name: Commit and push changes
id: github-push
run: |
git add .
git diff-index --quiet HEAD || git commit -m "Auto-update to latest version"
git push
- name: Failed to push
if: ${{ failure() && steps.github-push.conclusion == 'failure' }}
run: echo Application could not be updated or is already at the latest version.