Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion .github/workflows/daily.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@ name: Daily collection

on:
workflow_dispatch:
inputs:
slack_channel:
description: Slack channel to post the error message to if the builds fail.
required: false
default: "sdv-alerts-debug"

schedule:
- cron: '0 0 * * *'

jobs:
collect:
daily_github_collection:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -24,3 +30,21 @@ jobs:
env:
PYDRIVE_CREDENTIALS: ${{ secrets.PYDRIVE_CREDENTIALS }}

alert:
needs: [daily_github_collection]
runs-on: ubuntu-latest
if: failure()
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install slack dependencies
run: |
python -m pip install --upgrade pip
python -m pip install invoke
python -m pip install .[dev]
- name: Slack alert if failure
run: python -m github_analytics.slack_utils -r ${{ github.run_id }} -c ${{ github.event.inputs.slack_channel || 'sdv-alerts' }}
env:
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
27 changes: 26 additions & 1 deletion .github/workflows/weekly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@ name: Weekly collection

on:
workflow_dispatch:
inputs:
slack_channel:
description: Slack channel to post the error message to if the builds fail.
required: false
default: "sdv-alerts-debug"

schedule:
- cron: '1 0 * * 0'

jobs:
collect:
weekly_github_collection:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -23,3 +29,22 @@ jobs:
github-analytics collect -v -q -t ${{ secrets.PERSONAL_ACCESS_TOKEN }} -m -c weekly.yaml
env:
PYDRIVE_CREDENTIALS: ${{ secrets.PYDRIVE_CREDENTIALS }}

alert:
needs: [weekly_github_collection]
runs-on: ubuntu-latest
if: failure()
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install slack dependencies
run: |
python -m pip install --upgrade pip
python -m pip install invoke
python -m pip install .[dev]
- name: Slack alert if failure
run: python -m github_analytics.slack_utils -r ${{ github.run_id }} -c ${{ github.event.inputs.slack_channel || 'sdv-alerts' }}
env:
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}