36 lines
884 B
YAML
36 lines
884 B
YAML
name: Push GitHub Data to PostHog
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
# schedule:
|
|
# - cron: '0 0 * * *' # Runs every day at midnight
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
push-data:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.x'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install requests posthog
|
|
|
|
- name: Run data extraction and push script
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
|
|
POSTHOG_HOST: ${{ secrets.POSTHOG_HOST }}
|
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
|
run: |
|
|
python tools/push_to_posthog.py
|