chore: add read action
This commit is contained in:
parent
1858a82437
commit
10f34ccdaa
2 changed files with 83 additions and 27 deletions
56
.github/workflows/read-action.yaml
vendored
Normal file
56
.github/workflows/read-action.yaml
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
name: read action
|
||||
run-name: Book (${{ inputs.isbn }})
|
||||
permissions:
|
||||
contents: write
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
isbn:
|
||||
description: The book's ISBN. Required.
|
||||
required: true
|
||||
type: string
|
||||
notes:
|
||||
description: Notes about the book. Optional.
|
||||
type: string
|
||||
rating:
|
||||
description: Rate the book. Optional.
|
||||
type: choice
|
||||
default: "unrated"
|
||||
options:
|
||||
- "unrated"
|
||||
- ⭐️
|
||||
- ⭐️⭐️
|
||||
- ⭐️⭐️⭐️
|
||||
- ⭐️⭐️⭐️⭐️
|
||||
- ⭐️⭐️⭐️⭐️⭐️
|
||||
# Tags are optional.
|
||||
tags:
|
||||
description: Add tags to categorize the book. Separate each tag with a comma. Optional.
|
||||
type: string
|
||||
# If you do not submit date-started or date-finished, the book status will be set to "want to read"
|
||||
date-started:
|
||||
description: Date you started the book (YYYY-MM-DD). Optional.
|
||||
type: string
|
||||
date-finished:
|
||||
description: Date you finished the book (YYYY-MM-DD). Optional.
|
||||
type: string
|
||||
|
||||
# Set up the steps to run the action
|
||||
jobs:
|
||||
update-library:
|
||||
runs-on: macOS-latest
|
||||
name: Read
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Read
|
||||
uses: katydecorah/read-action@v7.1.0
|
||||
|
||||
- name: Commit updated read file
|
||||
run: |
|
||||
git pull
|
||||
git config --local user.email "hi@coryd.dev"
|
||||
git config --local user.name "Cory Dransfeldt"
|
||||
git add -A && git commit -m "📚 “${{ env.BookTitle }}” (${{ env.BookStatus }})"
|
||||
git push
|
Reference in a new issue