mirror of
https://github.com/YTLitePlus/YTLitePlus.git
synced 2026-05-10 19:40:35 +00:00
Create update.yml
This commit is contained in:
parent
016c8b0248
commit
6d09d2577e
1 changed files with 42 additions and 0 deletions
42
.github/workflows/update.yml
vendored
Normal file
42
.github/workflows/update.yml
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
name: Update apps.json everyday
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update_json:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install requests
|
||||||
|
|
||||||
|
- name: Run script
|
||||||
|
run: |
|
||||||
|
python update_json.py
|
||||||
|
|
||||||
|
- name: Check for changes
|
||||||
|
id: check_changes
|
||||||
|
run: |
|
||||||
|
git diff --exit-code || echo "::set-output name=has_changes::true"
|
||||||
|
|
||||||
|
- name: Commit and push changes
|
||||||
|
if: steps.check_changes.outputs.has_changes == 'true'
|
||||||
|
run: |
|
||||||
|
git config --global user.email "actions@github.com"
|
||||||
|
git config --global user.name "GitHub Actions"
|
||||||
|
git add .
|
||||||
|
git commit -m "Update JSON file with latest release"
|
||||||
|
git push
|
||||||
Loading…
Reference in a new issue