Collect Git Metrics #1012
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: Collect Git Metrics | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 */4 * * *' # “At minute 0 past every 4th hour.” | |
jobs: | |
collect_data: | |
runs-on: ubuntu-latest | |
environment: production | |
steps: | |
- name: Checkout repo content | |
uses: actions/checkout@v4 | |
- name: Create gs_credentials.json | |
run: echo -n ${{ secrets.GC_SA }} | base64 -d > gs_credentials.json | |
- name: Create virual environment | |
run: python3 -m venv .venv && source .venv/bin/activate | |
- name: Install requirements | |
run: pip install -r requirements.txt | |
- name: Run Python Script | |
run: python3 -u git_metrics.py | |
env: | |
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | |
GH_USERNAME: ${{ secrets.GH_USERNAME }} | |
GL_ACCESS_TOKEN: ${{ secrets.GL_ACCESS_TOKEN }} | |
PYTHONUNBUFFERED: "1" |