Skip to content

Instantly share code, notes, and snippets.

@frostming
Created March 20, 2022 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save frostming/81dbde38a97b0330e6cdcbde3068df5e to your computer and use it in GitHub Desktop.
Save frostming/81dbde38a97b0330e6cdcbde3068df5e to your computer and use it in GitHub Desktop.
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