Publish Advent of Code Statistics to Work Slack #79
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: 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@v4 | |
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 }} |