Update Collection #16362
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |