Pull down integrations from Notion #13160
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: Pull down integrations from Notion | |
on: | |
schedule: | |
- cron: '0 1-23/2 * * *' | |
workflow_dispatch: | |
jobs: | |
curl-notion: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v2 | |
- name: Use cURL to download JSON | |
run: |- | |
curl -X POST 'https://api.notion.com/v1/databases/75b1a5efc8d14087a4d8f714a0246ef6/query' -H 'Authorization: Bearer '"${{ secrets.NOTION_READONLY_API_SECRET }}"'' -H 'Notion-Version: 2021-08-16' -H 'Content-Type: application/json' -o data/reproductions.json | |
- name: Commit and push if it changed | |
run: |- | |
git config user.name "Automated" | |
git config user.email "actions@users.noreply.github.com" | |
git add -A | |
timestamp=$(date -u) | |
git commit -m "Latest data: ${timestamp}" || exit 0 | |
git push |