Skip to content

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

.github/workflows/notify-discord.yml

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

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\": \"Greater Good Gathering Guide\", \"content\": \"${USERS}you are signed up for Saturday! Would anyone else want to join? Unless someone writes something else, meeting point is around 12:00 at acend. May the dice gods be with you! :game_die:\"}" ${{ secrets.DISCORD_WEBHOOK_URL }}