Skip to content

Fetch Bing Image

Fetch Bing Image #1741

Workflow file for this run

name: 'Fetch Bing Image'
on:
push:
branches:
- master
paths:
- 'json/**'
- 'images/**'
schedule:
- cron: '0 17 * * *'
watch:
types: [started]
env:
TZ: Asia/Shanghai
jobs:
Bing-Spider:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: 'Set up Python'
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: 'Install dependencies'
run: python -m pip install --upgrade pip
- name: 'Install requirements'
run: pip install -r ./requirements.txt
- name: 'Working'
timeout-minutes: 350
run: |
echo `date +"%Y-%m-%d %H:%M:%S"` > time.log
python spider.py
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "WangNingkai"
git add -A
git commit -m ":rocket: Fetch BingImage at $(date +'%Y-%m-%d %H:%M')" -a
- name: 'Push changes'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true