.github/workflows/notify-discord.yml #20
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\": \"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 }} |