Skip to content

Scan for new API assets #1001

Scan for new API assets

Scan for new API assets #1001

Workflow file for this run

# This workflow will run the "tools/file_fetcher.py" script once a day, while
# also committing any changes to the repository.
name: Scan for new API assets
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch: {}
jobs:
backup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install aiohttp aiofiles yarl
- name: Configure git
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
- name: Run file fetcher
run: |
python tools/file_fetcher.py ./images incremental --count 1000
- name: Filter changes
run: |
git add images
git stash save --keep-index --include-untracked
- name: Commit and push relevant changes
continue-on-error: true
run: |
git commit -m "Automatic Asset Update"
git push origin main