-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (35 loc) · 1.45 KB
/
schedules.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: update starred
on:
workflow_dispatch:
schedule:
# every daily at 04:30
- cron: 30 4 * * *
# https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07
jobs:
starred:
name: update starred
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install starred
- name: get epository name
run: echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
- name: update repo category by language
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 'starred repos categorized by language update via github actions cron, created by starred'
- name: update repo 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 'starred repos categorized by language update via github actions cron, created by starred' --topic --topic_limit 500 --filename topics.md