Update Message Center Posts #11
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: Update Message Center Posts | |
| on: | |
| schedule: | |
| # Runs every Monday at 7:00 AM UTC | |
| - cron: '0 7 * * 1' | |
| workflow_dispatch: # Allow manual trigger | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-message-center: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: '22' | |
| - name: Update message center posts | |
| run: node scripts/update-message-center.js | |
| - name: Check for changes | |
| id: changes | |
| run: | | |
| git diff --quiet copilot-agent-strategy/copilot-agents-guide/index.html && echo "changed=false" >> "$GITHUB_OUTPUT" || echo "changed=true" >> "$GITHUB_OUTPUT" | |
| - name: Commit and push updates | |
| if: steps.changes.outputs.changed == 'true' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add copilot-agent-strategy/copilot-agents-guide/index.html | |
| git commit -m "chore: weekly message center posts refresh $(date +%Y-%m-%d)" | |
| git push |