📚 finished book 9781888363432 #117
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: 📚 ${{ inputs['book-status'] }} book ${{ inputs.identifier }} | |
# Grant the action permission to write to the repository | |
permissions: | |
contents: write | |
# Trigger the action | |
on: | |
workflow_dispatch: | |
inputs: | |
identifier: | |
description: The book's identifier. This is an ISBN, Libby or Libro.fm share URL. Required. | |
# Example values: | |
# 9780062315007 | |
# https://share.libbyapp.com/title/9575390 | |
# https://libro.fm/audiobooks/9781797176888-the-ministry-of-time | |
required: true | |
type: string | |
book-status: | |
description: What is the status of the book? Required. You can completely customize the default value and options. | |
required: true | |
type: choice | |
default: "want to read" | |
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 | |
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. You can completely customize the default value and options. | |
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 | |
# Set up the steps to run the action | |
jobs: | |
update-library: | |
runs-on: ubuntu-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 |