Synchronize Todoist #47239
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: Synchronize Todoist | |
on: | |
schedule: | |
- cron: "*/30 * * * *" | |
workflow_dispatch: | |
jobs: | |
sync_issues: | |
name: Synchronize // ${{ matrix.name }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- name: Issues | |
query: updated:>2021-04-01 archived:false sort:updated-desc assignee:cobraz -label:backlog | |
key: generic | |
- name: Pull Requests | |
query: is:pr updated:>2021-04-01 archived:false sort:updated-desc review-requested:cobraz -label:backlog | |
key: pr | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: google-github-actions/setup-gcloud@v0 | |
with: | |
service_account_key: ${{ secrets.GCP_KEY }} | |
export_default_credentials: true | |
- run: wget https://storage.googleapis.com/${{ secrets.BUCKET }}/${{ matrix.key }}.json || exit 0 | |
- name: Sync issues | |
if: always() | |
id: sync | |
uses: ./ | |
with: | |
github-token: ${{ secrets.PERSONAL_GITHUB_TOKEN }} | |
todoist-token: ${{ secrets.TODOIST_TOKEN }} | |
query: ${{ matrix.query }} | |
sync-file-name: ./${{ matrix.key }}.json | |
- uses: google-github-actions/upload-cloud-storage@main | |
with: | |
path: ./${{ matrix.key }}.json | |
destination: ${{ secrets.BUCKET }} |