Send out reminder about monthly meeting #50
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
name: Send out reminder about monthly meeting | |
on: | |
# Be careful when changing the schedule: | |
# CRON uses _or_ when day-of-month and day-of-week are provided. | |
schedule: | |
- cron: '1 0 * * THU' | |
workflow_dispatch: | |
jobs: | |
date: | |
name: "Calculate Date" | |
runs-on: ubuntu-latest | |
steps: | |
- id: date | |
run: | | |
next_date=$(date -d "next Monday" "+%d.%m.") | |
echo "next_date=$next_date" >> "$GITHUB_OUTPUT" | |
next_date_day=$(date -d "next Monday" "+%d") | |
if [[ $next_date_day < 15 ]] || [[ $next_date_day > 21 ]]; | |
then | |
echo "::notice::Wrong week, skip sending reminder." | |
exit 1 | |
fi | |
outputs: | |
next_date: ${{ steps.date.outputs.next_date }} | |
discord: | |
name: "Discord" | |
runs-on: ubuntu-latest | |
needs: | |
- date | |
steps: | |
- uses: cstuder/apprise-ga@v3.0.2 | |
with: | |
title: "📡 Kommenden Montag (${{ needs.date.outputs.next_date }}) ist wieder Freifunk Stammtisch 📡" | |
message: "Wir treffen uns um 19:30 Uhr in den Räumen des Netz39 e.V. in der Leibnizstr. 32!" | |
env: | |
APPRISE_URL: discord://${{ secrets.APPRISE_DISCORD_WEBHOOK_ID }}/${{ secrets.APPRISE_DISCORD_TOKEN }} | |
email: | |
name: "E-Mail" | |
runs-on: ubuntu-latest | |
needs: | |
- date | |
steps: | |
- uses: cstuder/apprise-ga@v3.0.2 | |
with: | |
title: "📡 Kommenden Montag (${{ needs.date.outputs.next_date }}) ist wieder Freifunk Stammtisch 📡" | |
message: |- | |
Liebe Freifunk-Interessent:innen, | |
unser nächstes Treffen findet am kommenden Montag (${{ needs.date.outputs.next_date }}) um 19:30 Uhr in den Räumen des Netz39 e.V. (Leibnizstr. 32) statt. | |
Falls ihr hybrid teilnehmen möchtet, gebt uns bitte bis 2h vorher per Mail an kontakt@md.freifunk.net Bescheid, dann kümmern wir uns um die Online-Variante. | |
Viele Grüße, | |
Das ffmd-Team | |
env: | |
APPRISE_URL: mailtos://mail.netz39.de/?user=${{ secrets.APPRISE_MAIL_USER }}&pass=${{ secrets.APPRISE_MAIL_PASS }}&from=FFMD<bot@netz39.de>&to=ffmd@netz39.de,ffmd-dev@netz39.de,announce@netz39.de |