Sync Todoist Project List #99
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 Todoist Project List | |
| on: | |
| schedule: | |
| # Refreshes the project dropdown daily at 06:00 UTC. | |
| - cron: '0 6 * * *' | |
| workflow_dispatch: | |
| permissions: {} | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Fetch Todoist projects and update workflow options | |
| env: | |
| TODOIST_API_TOKEN: ${{ secrets.TODOIST_API_TOKEN }} | |
| run: python3 .github/scripts/sync_project_options.py | |
| - name: Commit updated workflows if changed | |
| uses: colin-gourlay/todoist-playbook/.github/actions/commit-and-push@main | |
| with: | |
| commit_message: "chore: sync Todoist project and template options [skip ci]" | |
| add: ".github/workflows/create-todoist-project.yml .github/workflows/create-todoist-project-via-mcp.yml .github/workflows/create-todoist-project-from-prompt.yml" | |
| push_to: main |