From 41d5b481a9b308b0a421a13b5e1de559188f7687 Mon Sep 17 00:00:00 2001 From: Bin Yang Date: Mon, 12 Apr 2021 12:36:30 -0400 Subject: [PATCH] fix schedule and pull repo when push --- .github/workflows/repo_status_weekly.yml | 9 +++------ .github/workflows/wiki_gen_daily.yml | 6 ++++++ git_status.py | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/repo_status_weekly.yml b/.github/workflows/repo_status_weekly.yml index 0428179..d18c47b 100644 --- a/.github/workflows/repo_status_weekly.yml +++ b/.github/workflows/repo_status_weekly.yml @@ -1,12 +1,9 @@ name: Repo-Updater -# cron every sunday at 12 am, due to github api limits, change this to be ran once a week -#on: -# schedule: -# - cron: '0 0 * * *' # do every hour for now +on: + schedule: + - cron: '0 0 * * *' # do every hour for now -# generate wiki page on every push -on: push jobs: # Set the job key. The key is displayed as the job name diff --git a/.github/workflows/wiki_gen_daily.yml b/.github/workflows/wiki_gen_daily.yml index d4351b0..8425de3 100644 --- a/.github/workflows/wiki_gen_daily.yml +++ b/.github/workflows/wiki_gen_daily.yml @@ -26,6 +26,12 @@ jobs: if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: execute py script # run the run.py to get the latest data + run: | + python git_status.py + env: + GIT_TOKEN: ${{ secrets.GIT_TOKEN }} + + - name: execute py script # run the wiki_gen run: | python wiki_gen.py diff --git a/git_status.py b/git_status.py index b5add13..28e02d8 100644 --- a/git_status.py +++ b/git_status.py @@ -319,5 +319,5 @@ def parse_readme_md(): if __name__ == '__main__': - # get_repo_status() + get_repo_status() search_new_repo_and_append(min_stars_number=100)