With this #recipe you can create notes on your iOS device, which will automatically be imported into Foam.
foam-capture-action
in your GitHub Repository, to be triggered by “Workflow dispatch” events.name: Manually triggered workflow
on:
workflow_dispatch:
inputs:
data:
description: 'What information to put in the knowledge base.'
required: true
jobs:
store_data:
runs-on: ubuntu-latest
# If you encounter a 403 error from a workflow run, try uncommenting the following 2 lines (taken from: https://stackoverflow.com/questions/75880266/cant-make-push-on-a-repo-with-github-actions accepted answer)
# permissions:
# contents: write
steps:
- uses: actions/checkout@master
- uses: anglinb/foam-capture-action@main
with:
capture: ${{ github.event.inputs.data }}
- run: |
git config --local user.email "example@gmail.com"
git config --local user.name "Your name"
git commit -m "Captured from workflow trigger" -a
git push -u origin master
repo
scope - make a note of the tokenworkflow-id
to be used in the Shortcut.curl \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer <GITHUB_TOKEN>" \
https://api.github.com/repos/<owner>/<repository>/actions/workflows
GetContentsOfURL
owner
, repository
, workflow-id
(from the previous step)[GITHUB_TOKEN]
with your Personal Access Token (from step 2)inbox.md
in your repository.)