Discord Meeting Notify #8530
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: Discord Meeting Notify | |
| on: | |
| schedule: | |
| - cron: '*/5 * * * *' # Run every 5 minutes | |
| workflow_dispatch: # Allow manual triggering from GitHub UI | |
| jobs: | |
| notify: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: pip install requests | |
| - name: Run Discord notification script | |
| env: | |
| DISCORD_ACD_WEBHOOK: ${{ secrets.DISCORD_ACD_WEBHOOK }} | |
| ZOOM_CLIENT_ID: ${{ secrets.ZOOM_CLIENT_ID }} | |
| ZOOM_CLIENT_SECRET: ${{ secrets.ZOOM_CLIENT_SECRET }} | |
| ZOOM_REFRESH_TOKEN: ${{ secrets.ZOOM_REFRESH_TOKEN }} | |
| run: python .github/ACDbot/scripts/discord_notify.py | |
| - name: Commit mapping file | |
| if: always() | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| git config --local user.email "[email protected]" | |
| git config --local user.name "GitHub Action" | |
| if git diff --quiet .github/ACDbot/meeting_topic_mapping.json; then | |
| echo "No changes to mapping file" | |
| else | |
| git add .github/ACDbot/meeting_topic_mapping.json | |
| git commit -m "Update meeting-topic mapping with Discord notifications" | |
| git push | |
| echo "Committed mapping file changes" | |
| fi | |
| permissions: | |
| contents: write |