Skip to content

Update Collection #16422

Update Collection

Update Collection #16422

name: Update Collection
on:
push:
branches: [master]
schedule:
- cron: '0 * * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: pip install -r requirements.txt
- name: Update collection
run: |
python star.py -u ${GITHUB_REPOSITORY%%/*} > README.md
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
if [ -n "$(git status --porcelain)" ]; then
git add .
git commit -m "update collection"
fi
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master