Tito to Slack #171
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
# A github action to run a Python script | |
# that sends a message to a Slack channel daily at 9 am AEST | |
name: Tito to Slack | |
on: | |
schedule: | |
# This should be 9 am AEST, monday, wednesday and friday | |
- cron: "0 23 * * 0,2,4" | |
workflow_dispatch: | |
jobs: | |
build-and-run: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: pip install . | |
- name: Run Python script | |
env: | |
TITO_KEY: ${{ secrets.TITO_KEY }} | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
run: tito-to-slack ${{ vars.ACCOUNT }} ${{ vars.EVENT }} ${{ vars.EVENT_DATE }} |