-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (39 loc) · 1.34 KB
/
schedule.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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 }}