-
Notifications
You must be signed in to change notification settings - Fork 74
44 lines (37 loc) · 1.43 KB
/
posthog_pipeline.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: analytics | Push GitHub Data to PostHog
on:
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: Print working directory, list folders, and run script
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
POSTHOG_HOST: ${{ secrets.POSTHOG_HOST }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: |
echo "Current working directory:"
pwd # Print the current working directory
echo "List of folders in the current directory:"
ls -la # List all files and folders in the current directory
echo "Changing to tools directory..."
cd tools # Change to the 'tools' directory
echo "Current working directory after changing to tools:"
pwd # Print the working directory again
echo "List of folders in the tools directory:"
ls -la # List all files and folders in the 'tools' directory
python push_to_posthog.py # Run the script