Book (9781984825469 - started) #98
Workflow file for this run
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: read action | |
run-name: Book (${{ inputs.isbn }} - ${{ inputs.bookStatus }}) | |
# Grant the action permission to write to the repository | |
permissions: | |
contents: write | |
# Trigger the action | |
on: | |
workflow_dispatch: | |
inputs: | |
isbn: | |
description: The book's ISBN. Required. | |
required: true | |
type: string | |
notes: | |
description: Notes about the book. Optional. | |
type: string | |
# Adding a rating is optional. | |
# You can change the options to whatever you want to use. | |
# For example, you can use numbers, other emoji, or words. | |
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 | |
bookStatus: | |
description: What is the status of the book? Required. | |
required: true | |
type: choice | |
options: | |
- "want to read" | |
- "started" | |
- "finished" | |
- "abandoned" | |
date: | |
description: Date to record the status of the book (YYYY-MM-DD). Leave blank for today. 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@v4 | |
- name: Read | |
uses: ./ | |
- name: Commit updated read file | |
run: | | |
git pull | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add -A && git commit -m "📚 “${{ env.BookTitle }}” (${{ env.BookStatus }})" | |
git push |