Skip to content

Publish Advent of Code Statistics to Work Slack #99

Publish Advent of Code Statistics to Work Slack

Publish Advent of Code Statistics to Work Slack #99

name: Publish Advent of Code Statistics to Work Slack
on:
schedule:
# 10pm Central time, December 1-30
- cron: '0 4 2-31 12 *'
# 10pm Central time, December 31 & January 1
- cron: '0 4 1-2 1 *'
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install Poetry
uses: snok/[email protected]
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install dependencies with poetry
run: poetry install --no-interaction --no-dev --extras leaderboard
- name: Run Python script
run: |
poetry run python .github/leaderboard.py
env:
LEADERBOARD_ID: ${{ secrets.LEADERBOARD_ID }}
SESSION_ID: ${{ secrets.SESSION_ID }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_WORK }}