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