Skip to content

9780008520908 2024-01-01 #475

9780008520908 2024-01-01

9780008520908 2024-01-01 #475

Workflow file for this run

---
name: Add Book
on:
issues:
types: [labeled, edited]
env:
content: ${{ github.event.issue.body }}
label: ${{ github.event.label.name }}
issue_number: ${{ github.event.issue.number }}
actor: ${{ github.actor }}
owner: ${{ github.repository_owner }}
jobs:
Checks:
if: contains( github.event.issue.labels.*.name, 'read')
runs-on: ubuntu-latest
steps:
- name: Echo
run: echo "Label is $label"
Build:
needs: Checks
if: ${{ github.actor == github.repository_owner }}
runs-on: macOS-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Read
uses: mat-0/[email protected]
- name: Download the book thumbnail
run: curl "${{env.BookThumb}}" -o "images/books/${{env.BookThumbOutput}}"
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A && git commit -m "Added ${{ env.BookTitle }}"
git push
- name: Close issue
uses: peter-evans/close-issue@v3
with:
issue-number: "${{ env.IssueNumber }}"
comment: "📚 You read ${{ env.BookTitle }} on ${{env.DateRead}}."