.github/workflows/notify-discord.yml #9
Workflow file for this run
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
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 }} |