Sync KDS Roadmap Project Statuses #23
This file contains 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: | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Install axios | |
run: npm install axios | |
- uses: tibdex/github-app-token@v1 | |
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@v7 | |
with: | |
github-token: ${{ steps.generate-token.outputs.token }} | |
script: | | |
const { synchronizeProjectsStatuses } = require('./.github/githubUtils.js'); | |
synchronizeProjectsStatuses(context, github); |