Sync KDS Roadmap Project Statuses #7545
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: Sync KDS Roadmap Project Statuses | |
| on: | |
| schedule: | |
| - cron: "0 * * * *" # Run every hour | |
| workflow_dispatch: | |
| jobs: | |
| sync-projects: | |
| if: github.repository_owner == 'learningequality' | |
| runs-on: ubuntu-latest | |
| permissions: write-all | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '18' | |
| - uses: tibdex/github-app-token@v2 | |
| id: generate-token | |
| with: | |
| app_id: ${{ secrets.LE_BOT_APP_ID }} | |
| private_key: ${{ secrets.LE_BOT_PRIVATE_KEY }} | |
| - name: Check and Sync Project Statuses | |
| uses: actions/github-script@v8 | |
| env: | |
| ITERATION_BACKLOG_PROJECT_NUMBER: ${{ secrets.ITERATION_BACKLOG_PROJECT_NUMBER }} | |
| KDS_ROADMAP_PROJECT_NUMBER: ${{ secrets.KDS_ROADMAP_PROJECT_NUMBER }} | |
| with: | |
| github-token: ${{ steps.generate-token.outputs.token }} | |
| script: | | |
| const { synchronizeProjectsStatuses } = require('./.github/githubUtils.js'); | |
| const sourceNumber = process.env.ITERATION_BACKLOG_PROJECT_NUMBER; | |
| const targetNumber = process.env.KDS_ROADMAP_PROJECT_NUMBER; | |
| synchronizeProjectsStatuses({context, github, sourceNumber, targetNumber}); |