mirror of
https://github.com/gokadzev/Musify.git
synced 2026-03-13 15:20:46 +08:00
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: Update Downloads Data
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 0 * * *'
|
|
workflow_dispatch:
|
|
|
|
|
|
jobs:
|
|
downloads_data:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check Repository
|
|
run: |
|
|
if [ "${{ github.repository }}" != "gokadzev/Musify" ]; then
|
|
echo "Skipping workflow run as it's not the original repository."
|
|
exit 0
|
|
fi
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: update # Use the update branch instead of master
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
- name: Install dependencies
|
|
run: pip install requests
|
|
|
|
- name: Run Python script
|
|
run: python downloads.py
|
|
|
|
- name: Set up Git
|
|
run: |
|
|
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
|
git config --global user.name "${GITHUB_ACTOR}"
|
|
|
|
|
|
- name: Commit changes
|
|
run: |
|
|
git add .
|
|
git diff-index --quiet HEAD || git commit -m "Update Downloads data"
|
|
git push origin update
|