TAC Chair Reminder #3
This file contains hidden or 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
| # Posts a reminder to Slack #ccc-tac about the upcoming TAC meeting chair | |
| # and scheduled topics. | |
| # | |
| # Runs every Friday at 15:00 UTC (8am PT) — gives the chair notice before | |
| # the Monday planning meetings. | |
| # | |
| # Required repository secret: | |
| # SLACK_WEBHOOK_URL — Incoming Webhook URL for #ccc-tac | |
| # | |
| # The meeting schedule is read from TAC/meeting-schedule.md. | |
| name: TAC Chair Reminder | |
| on: | |
| schedule: | |
| # Every Friday at 15:00 UTC (8 am PT) | |
| - cron: "0 15 * * 5" | |
| workflow_dispatch: # Allow manual trigger for testing | |
| jobs: | |
| remind: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Check for meeting this week | |
| id: meeting | |
| run: | | |
| result=$(python3 .github/scripts/parse-schedule.py this-week) | |
| echo "json=$result" >> "$GITHUB_OUTPUT" | |
| # Parse fields for later steps | |
| date=$(echo "$result" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('date',''))") | |
| chair=$(echo "$result" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('chair',''))") | |
| project_topic=$(echo "$result" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('project_topic',''))") | |
| error=$(echo "$result" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('error',''))") | |
| echo "date=$date" >> "$GITHUB_OUTPUT" | |
| echo "chair=$chair" >> "$GITHUB_OUTPUT" | |
| echo "project_topic=$project_topic" >> "$GITHUB_OUTPUT" | |
| echo "error=$error" >> "$GITHUB_OUTPUT" | |
| if [ -n "$error" ]; then | |
| echo "skip=true" >> "$GITHUB_OUTPUT" | |
| echo "ℹ️ $error — skipping reminder." | |
| elif [ -z "$chair" ]; then | |
| echo "skip=true" >> "$GITHUB_OUTPUT" | |
| echo "⚠️ Meeting on $date has no chair assigned — skipping reminder." | |
| else | |
| echo "skip=false" >> "$GITHUB_OUTPUT" | |
| echo "📣 Meeting on $date — chair: $chair" | |
| fi | |
| - name: Post to Slack | |
| if: steps.meeting.outputs.skip == 'false' | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
| MEETING_DATE: ${{ steps.meeting.outputs.date }} | |
| CHAIR_NAME: ${{ steps.meeting.outputs.chair }} | |
| PROJECT_TOPIC: ${{ steps.meeting.outputs.project_topic }} | |
| run: | | |
| # Format the date nicely | |
| formatted_date=$(date -d "$MEETING_DATE" "+%A, %B %-d, %Y" 2>/dev/null || echo "$MEETING_DATE") | |
| # Build the agenda topics section dynamically | |
| topics="" | |
| if [ -n "$PROJECT_TOPIC" ]; then | |
| topics="\n\n*Scheduled Topics:*\n• *CCC Project:* ${PROJECT_TOPIC}" | |
| fi | |
| curl -X POST "$SLACK_WEBHOOK_URL" \ | |
| -H "Content-Type: application/json" \ | |
| --fail-with-body \ | |
| -d @- <<EOF | |
| { | |
| "text": "📋 *TAC Meeting Reminder*\n\n*Date:* ${formatted_date}\n*Time:* 7:00–9:00 am PT\n*Chair:* ${CHAIR_NAME}${topics}\n\n_${CHAIR_NAME} — as this week's chair please attend the Monday TAC Coordination meeting and help prepare and share the agenda with the TAC before the meeting. See the <https://github.com/confidential-computing/governance/blob/main/TAC/meeting-schedule.md|meeting schedule> for details._" | |
| } | |
| EOF |