Update Star Counts #204
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 Star Counts | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 8 * * 5' | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
pip3 install PyGithub PyYAML | |
- name: Update star counts (bootstrap.yml) | |
run: | | |
script/update-star-count.py --token $GITHUB_TOKEN _data/bootstrap.yml | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Update star counts (frameworks.yml) | |
run: | | |
script/update-star-count.py --token $GITHUB_TOKEN _data/frameworks.yml | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Update star counts (inspiration.yml) | |
run: | | |
script/update-star-count.py --token $GITHUB_TOKEN _data/inspiration.yml | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Update star counts (utilities.yml) | |
run: | | |
script/update-star-count.py --token $GITHUB_TOKEN _data/utilities.yml | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Commit files | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git commit -m "Update star counts" _data | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |