π update - starred #566
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 - starred' | |
on: | |
schedule: | |
- cron: '30 0 * * *' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
env: | |
MESSAGE: 'π update' | |
jobs: | |
starred: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies and starred | |
run: | | |
python -m pip install --upgrade pip | |
pip install starred | |
- name: Get repository name | |
run: echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV | |
- name: update repo category by language | |
env: | |
TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
USERNAME: ${{ github.repository_owner }} | |
REPOSITORY: ${{ env.REPOSITORY_NAME }} | |
run: | | |
starred \ | |
--username "${USERNAME}" \ | |
--repository "${REPOSITORY}" \ | |
--sort \ | |
--token "${TOKEN}" \ | |
--message "${MESSAGE}" \ | |
--filename stars.md | |
- name: update repo category by topic | |
env: | |
TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
USERNAME: ${{ github.repository_owner }} | |
REPOSITORY: ${{ env.REPOSITORY_NAME }} | |
run: | | |
starred \ | |
--username "${USERNAME}" \ | |
--repository "${REPOSITORY}" \ | |
--sort \ | |
--token "${TOKEN}" \ | |
--message "${MESSAGE}" \ | |
--topic \ | |
--topic_limit 500 \ | |
--filename topics.md |