Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
name: Add to Journal
on:
workflow_dispatch:
inputs:
text:
description: Add a single item to Logseq journal
type: string
required: true
jobs:
add_to_journal:
name: Add item to journal
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: add line to file and commit
run: |
filename="journals/$(date +'%Y_%m_%d').md"
echo "- ${{ github.event.inputs.text }}" >> $filename
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add $filename
git commit -m "Journal added by github action"
- name: Push changes
uses: ad-m/github-push-action@master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment