Send out reminder about monthly meeting #41
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: | |
schedule: | |
- cron: '1 0 * * SUN' | |
workflow_dispatch: | |
jobs: | |
date: | |
name: "Calculate Date" | |
runs-on: ubuntu-latest | |
steps: | |
- id: date | |
run: | | |
next_date=$(date -d "next Wednesday" "+%d.%m.") | |
next_date_iso=$(date -d "next Wednesday" "+%Y-%m-%d") | |
next_date_year=$(date -d "next Wednesday" "+%Y") | |
echo "next_date=$next_date" >> "$GITHUB_OUTPUT" | |
echo "next_date_iso=$next_date_iso" >> "$GITHUB_OUTPUT" | |
echo "next_date_year=$next_date_year" >> "$GITHUB_OUTPUT" | |
next_date_week=$(date -d "next Wednesday" "+%V") | |
if [[ $((10#$next_date_week % 3)) != 0 ]]; | |
then | |
echo "::notice::Wrong week, skip sending reminder." | |
exit 1 | |
fi | |
outputs: | |
next_date: ${{ steps.date.outputs.next_date }} | |
next_date_iso: ${{ steps.date.outputs.next_date_iso }} | |
next_date_year: ${{ steps.date.outputs.next_date_year }} | |
discord: | |
name: "Discord" | |
runs-on: ubuntu-latest | |
needs: | |
- date | |
steps: | |
- uses: cstuder/[email protected] | |
with: | |
title: "Netz39-Stammtisch am kommenden Mittwoch (${{ needs.date.outputs.next_date }}) um 19:30 Uhr!" | |
message: "Folgende Themen werden besprochen: https://wiki.netz39.de/stammtisch:${{ needs.date.outputs.next_date_year }}:${{ needs.date.outputs.next_date_iso }}" | |
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/[email protected] | |
with: | |
title: "Netz39-Stammtisch am kommenden Mittwoch (${{ needs.date.outputs.next_date }})" | |
message: |- | |
Hallo Leute, | |
am kommenden Mittwoch (${{ needs.date.outputs.next_date }}) findet um 19:30 Uhr unser nächster | |
Netz39-Stammtisch in unseren Vereinsräumlichkeiten (Leibnizstraße 32) statt! | |
Folgende Themen werden besprochen: | |
https://wiki.netz39.de/stammtisch:${{ needs.date.outputs.next_date_year }}:${{ needs.date.outputs.next_date_iso }} | |
Falls Ihr hybrid teilnehmen möchtet, gebt uns bitte bis zwei | |
Stunden vorher Bescheid, indem Ihr auf diese Mail antwortet. | |
Dann kümmern wir uns um die Online-Variante. | |
Viele Grüße, | |
das Netz39-Team | |
env: | |
APPRISE_URL: mailtos://mail.netz39.de/?user=${{ secrets.APPRISE_MAIL_USER }}&pass=${{ secrets.APPRISE_MAIL_PASS }}&from=Netz39<[email protected]>&[email protected],[email protected] |