refactor to split otu search and status run to reduce api hit

This commit is contained in:
Bin Yang
2021-04-13 11:01:47 -04:00
parent 0c50c4ef63
commit 90b8cb9b2d
6 changed files with 391 additions and 338 deletions
+38
View File
@@ -0,0 +1,38 @@
name: Repo-Search
on:
schedule:
- cron: '0 0 * * *'
jobs:
# Set the job key. The key is displayed as the job name
update-repo-status:
# Name the Job
name: Update repo status for all saved repo
# Set the type of machine to run on
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
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_search.py
env:
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
- name: Commit & Push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GIT_TOKEN }}
+1 -1
View File
@@ -2,7 +2,7 @@ name: Repo-Updater
on:
schedule:
- cron: '0 0 * * *' # daily
- cron: '0 0 * * 0' # weekly
jobs:
+5 -5
View File
@@ -25,11 +25,11 @@ jobs:
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# - name: execute status update script # run the run.py to get the latest data
# run: |
# python git_status.py
# env:
# GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
- name: execute status update script # run the run.py to get the latest data
run: |
python git_search.py
env:
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
- name: execute wiki generation script # run the wiki_gen
run: |