Create FAIR TSC General Weekly Discussion #18
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
| name: Create FAIR TSC General Weekly Discussion | |
| on: | |
| workflow_dispatch: # Manual runs with optional date override | |
| inputs: | |
| meeting_date: | |
| description: 'Meeting date (YYYY-MM-DD). If omitted, uses next Thursday.' | |
| required: false | |
| schedule: | |
| - cron: '5 18 * * 4' # Every Thursday at 18:05 UTC (post next week's agenda) | |
| permissions: | |
| contents: read | |
| jobs: | |
| post-weekly-discussion: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up dynamic values | |
| id: vars | |
| run: | | |
| # Use manual date if provided; otherwise default to NEXT Thursday. | |
| if [ -n "${{ github.event.inputs.meeting_date }}" ]; then | |
| MEETING_DATE="${{ github.event.inputs.meeting_date }}" | |
| else | |
| MEETING_DATE=$(date -u -d "next thursday" +'%Y-%m-%d') | |
| fi | |
| DISPLAY_DATE=$(date -u -d "$MEETING_DATE" +'%B %d, %Y') | |
| TZ_LINK="https://www.timeanddate.com/worldclock/fixedtime.html?iso=${MEETING_DATE//-}T1700" | |
| echo "date_slug=$MEETING_DATE" >> $GITHUB_OUTPUT | |
| echo "date_display=$DISPLAY_DATE" >> $GITHUB_OUTPUT | |
| echo "tz_link=$TZ_LINK" >> $GITHUB_OUTPUT | |
| - name: Check for existing discussion | |
| id: check_existing | |
| env: | |
| GH_TOKEN: ${{ secrets.DISCUSSION_PAT }} | |
| run: | | |
| TITLE="TSC General Meeting Agenda - ${{ steps.vars.outputs.date_slug }}" | |
| Q="repo:fairpm/tsc is:discussion in:title \"$TITLE\"" | |
| RESP=$(gh api graphql -f query=' | |
| query($q:String!) { | |
| search(query:$q, type: DISCUSSION, first: 1) { | |
| discussionCount | |
| edges { node { ... on Discussion { title url } } } | |
| } | |
| }' -f q="$Q") | |
| COUNT=$(echo "$RESP" | jq -r '.data.search.discussionCount') | |
| if [ "$COUNT" -gt 0 ]; then | |
| URL=$(echo "$RESP" | jq -r '.data.search.edges[0].node.url') | |
| echo "found=true" >> "$GITHUB_OUTPUT" | |
| echo "existing_url=$URL" >> "$GITHUB_OUTPUT" | |
| echo "Found existing discussion: $URL" | |
| else | |
| echo "found=false" >> "$GITHUB_OUTPUT" | |
| echo "existing_url=" >> "$GITHUB_OUTPUT" | |
| echo "No existing discussion found for: $TITLE" | |
| fi | |
| - name: Create GitHub Discussion | |
| if: ${{ steps.check_existing.outputs.found != 'true' }} | |
| id: create_discussion | |
| uses: abirismyname/[email protected] | |
| with: | |
| github-token: ${{ secrets.DISCUSSION_PAT }} | |
| repository-name: fairpm/tsc | |
| category-name: General | |
| title: "TSC General Meeting Agenda - ${{ steps.vars.outputs.date_slug }}" | |
| body: | | |
| **Meeting Purpose:** Strategic direction, governance, policy, cross-team priorities, and project oversight. | |
| **Audience:** FAIR TSC members & open observers (as allowed). | |
| ## Meeting details | |
| * Meeting is ${{ steps.vars.outputs.date_display }} – 17:00 UTC ([see it in your time zone](${{ steps.vars.outputs.tz_link }})) | |
| * [Link to Join Meeting via Zoom](https://zoom-lfx.platform.linuxfoundation.org/meeting/95837337329?password=fd00a64e-3e89-49a9-9827-17f381443a7c) | |
| * [Link to Calendar](https://zoom-lfx.platform.linuxfoundation.org/meetings/fair-package-manager?view=week) | |
| ## How to join | |
| This call is open to anyone, but note that you need to have a profile/account at [OpenProfile.dev](https://openprofile.dev/) to join the call. | |
| ## Reminders | |
| FAIR is part of the Linux Foundation. Meeting attendees are subject to both the [Code of Conduct](https://github.com/fairpm/tsc/blob/main/code-of-conduct.md) and the [LF Antitrust Policy](https://www.linuxfoundation.org/legal/antitrust-policy). | |
| This meeting is recorded and publicly available via your OpenProfile.dev account. | |
| ## Agenda | |
| * As part of our standing agenda, we will review the [TSC Project Board](https://github.com/orgs/fairpm/projects/11) and any action items from the previous meeting. | |
| * Please add your agenda items as comments to this discussion and up-vote the ones you'd | |
| - name: Skip creation (already exists) | |
| if: ${{ steps.check_existing.outputs.found == 'true' }} | |
| run: | | |
| echo "Discussion already exists: ${{ steps.check_existing.outputs.existing_url }} — skipping creation." | |
| - name: Announce in Slack (success only) | |
| if: ${{ steps.check_existing.outputs.found != 'true' && steps.create_discussion.outcome == 'success' && steps.create_discussion.outputs.discussion-url != '' }} | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_FAIR_MEETING_ANNOUNCER }} | |
| DATE_DISPLAY: ${{ steps.vars.outputs.date_display }} | |
| TZ_LINK: ${{ steps.vars.outputs.tz_link }} | |
| DISCUSSION_URL: ${{ steps.create_discussion.outputs.discussion-url }} | |
| run: | | |
| payload=$(jq -n \ | |
| --arg d "$DATE_DISPLAY" \ | |
| --arg url "$DISCUSSION_URL" \ | |
| --arg tz "$TZ_LINK" \ | |
| '{ | |
| blocks: [ | |
| { "type": "section", "text": { "type": "mrkdwn", "text": ":spiral_calendar_pad: *TSC General Call Agenda Posted*" } }, | |
| { "type": "section", "text": { "type": "mrkdwn", "text": ("*Date:* " + $d + " (17:00 UTC)") } }, | |
| { "type": "section", "text": { "type": "mrkdwn", "text": (":link: <" + $url + "|View agenda>") } }, | |
| { "type": "section", "text": { "type": "mrkdwn", "text": (":earth_americas: <" + $tz + "|See in your timezone>") } } | |
| ] | |
| }') | |
| curl -sS -X POST -H 'Content-type: application/json' --data "$payload" "$SLACK_WEBHOOK_URL" | |
| - name: Skip Slack notification | |
| if: ${{ !(steps.check_existing.outputs.found != 'true' && steps.create_discussion.outcome == 'success' && steps.create_discussion.outputs.discussion-url != '') }} | |
| run: echo "Skipping Slack — duplicate or creation failed." |