Skip to content

Commit

Permalink
Merge pull request #5 from grodtron/grodtron-patch-2
Browse files Browse the repository at this point in the history
Create preview-pr.yml
grodtron authored Feb 1, 2024
2 parents dc374cc + dbf490f commit ece153a
Showing 2 changed files with 33 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy-to-todoist.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Run TodoistAutomation CLI on main branch commits
name: Deploy Todoist Changes

on:
pull_request:
push:
branches:
- main

@@ -27,4 +27,4 @@ jobs:
- name: Run TodoistAutomation CLI
run: |
todoist-sync --dry-run --api-key ${{ secrets.TODOIST_API_KEY }} --yaml-file ./gtd.yml preview --github-token ${{ secrets.GITHUB_TOKEN }} --repo ${{ github.repository }} --pr-number ${{ github.event.pull_request.number }}
todoist-sync --dry-run --api-key ${{ secrets.TODOIST_API_KEY }} --yaml-file ./gtd.yml sync
30 changes: 30 additions & 0 deletions .github/workflows/preview-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Preview Changes in PR

on:
pull_request:
branches:
- main

jobs:
run_todoist_automation:
name: Run TodoistAutomation CLI
runs-on: ubuntu-latest
permissions:
pull-requests: write

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.11'

- name: Install TodoistAutomation CLI
run: |
pip install git+https://github.com/grodtron/TodoistAutomation
- name: Run TodoistAutomation CLI
run: |
todoist-sync --dry-run --api-key ${{ secrets.TODOIST_API_KEY }} --yaml-file ./gtd.yml preview --github-token ${{ secrets.GITHUB_TOKEN }} --repo ${{ github.repository }} --pr-number ${{ github.event.pull_request.number }}

0 comments on commit ece153a

Please sign in to comment.