run main.py #473
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: run main.py | |
on: | |
schedule: | |
- cron: '5 0-23/3 * * *' # At minute 5 past every 3rd hour starting from 12:05AM | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo content | |
uses: actions/checkout@v3 # checkout the repository content | |
- name: setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' # install the python version needed | |
- name: install python packages not in requirements.txt | |
run: | | |
python -m pip install --upgrade pip | |
pip install --upgrade google-auth | |
pip install --upgrade google-api-python-client | |
pip install --upgrade google-auth-httplib2 | |
pip install --upgrade google-auth-oauthlib | |
pip install chardet | |
- name: caching Python requirements in requirements.txt | |
id: cache-python | |
uses: actions/cache@v3 | |
with: | |
# pip cache files are stored in `~/.cache/pip` | |
path: ${{ env.pythonLocation}}/lib/python3.10/site-packages/* | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
${{ runner.os }}- | |
- if: ${{ steps.cache-python.outputs.cache-hit != 'true' }} | |
name: Install Dependencies | |
# continue-on-error: true | |
run: pip install -r requirements.txt | |
- name: ls show env.pythonLocation | |
run: ls -R ${{ env.pythonLocation}} | |
- name: show module | |
run: pip show pandas | |
# - name: setup environment and run script | |
# env: | |
# API_KEY_GITHUB_PROJECTBOARD_DASHBOARD: ${{ secrets.API_KEY_GITHUB_PROJECTBOARD_DASHBOARD }} | |
# BASE64_PROJECT_BOARD_GOOGLECREDENTIAL: ${{ secrets.BASE64_PROJECT_BOARD_GOOGLECREDENTIAL }} | |
# API_TOKEN_USERNAME: ${{ secrets.API_TOKEN_USERNAME }} | |
# run: python Project_Board_Dashboard_Script.py | |
- name: setup environment and run issues_with_missing_labels_over_time.py | |
env: | |
API_KEY_GITHUB_PROJECTBOARD_DASHBOARD: ${{ secrets.API_KEY_GITHUB_PROJECTBOARD_DASHBOARD }} | |
BASE64_PROJECT_BOARD_GOOGLECREDENTIAL: ${{ secrets.BASE64_PROJECT_BOARD_GOOGLECREDENTIAL }} | |
API_TOKEN_USERNAME: ${{ secrets.API_TOKEN_USERNAME }} | |
run: python issues_with_missing_labels_over_time.py |