weekly-meeting-agenda.yml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. name: Weekly Meeting Agenda
  2. on:
  3. schedule:
  4. # Run every Wednesday at 12:00 UTC (3 hours before the 15:00 UTC meeting)
  5. - cron: '0 12 * * 3'
  6. workflow_dispatch: # Allow manual triggering for testing
  7. permissions:
  8. contents: write
  9. pull-requests: write
  10. issues: read
  11. jobs:
  12. generate-agenda:
  13. runs-on: ubuntu-latest
  14. steps:
  15. - name: Checkout repository
  16. uses: actions/checkout@v4
  17. - name: Generate meeting agenda
  18. id: generate
  19. env:
  20. GH_TOKEN: ${{ github.token }}
  21. GITHUB_REPOSITORY: ${{ github.repository }}
  22. OUTPUT_TO_FILE: "true"
  23. CREATE_DISCUSSION: "false"
  24. DAYS_BACK: "7"
  25. run: |
  26. bash .github/scripts/generate-agenda.sh
  27. - name: Create Pull Request
  28. env:
  29. GH_TOKEN: ${{ github.token }}
  30. run: |
  31. MEETING_DATE=$(date -u +"%Y-%m-%d")
  32. BRANCH_NAME="meeting-agenda-${MEETING_DATE}"
  33. git config --global user.name 'github-actions[bot]'
  34. git config --global user.email 'github-actions[bot]@users.noreply.github.com'
  35. # Create and switch to new branch
  36. git checkout -b "$BRANCH_NAME"
  37. # Add and commit the agenda file
  38. git add meetings/*.md
  39. if git diff --cached --quiet; then
  40. echo "No changes to commit"
  41. exit 0
  42. fi
  43. git commit -m "chore: add weekly meeting agenda for ${MEETING_DATE}"
  44. # Push the branch
  45. git push origin "$BRANCH_NAME"
  46. # Create pull request
  47. gh pr create \
  48. --title "Weekly Meeting Agenda - ${MEETING_DATE}" \
  49. --body "Automated weekly meeting agenda for CDK Development Meeting on ${MEETING_DATE}." \
  50. --base main \
  51. --head "$BRANCH_NAME"