Skip to content

.github/workflows/notify-discord.yml #9

.github/workflows/notify-discord.yml

.github/workflows/notify-discord.yml #9

Workflow file for this run

on:
schedule:
- cron: '32 16 * * 4'
workflow_dispatch:
jobs:
notify-discord:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.7'
- run: pip install -r requirements.txt
- run: |
VOTES=$(framadatectl --url ${{ secrets.FRAMADATE_ADMIN_URL }} show next-slot)
MAP='${{ secrets.DISCORD_USERNAME_MAP }}'
USERS=$(./parse-votes.sh "$VOTES" "$MAP")
curl --header "Content-Type: application/json" --data "{\"username\": \"Your weekly hoppy game day organiser\", \"content\": \"${USERS}you are signed up for next Saturday! May the dice gods be with you :game_die:\"}" ${{ secrets.DISCORD_WEBHOOK_URL }}