-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.02 KB
/
books.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: bookshelf
on:
schedule:
- cron: "34 0/6 * * *"
workflow_dispatch:
inputs:
tags:
description: "check yourself?"
required: false
type: boolean
permissions:
contents: write
jobs:
reading:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install deps
run: npm ci --omit=dev
- name: Check for reading updates
run: npm run reading
- name: Check for changes
id: check_changes
run: |
if [[ -n $(git status --porcelain) ]]; then
echo "changes=true" >> "$GITHUB_OUTPUT";
fi
- name: Commit results
if: steps.check_changes.outputs.changes == 'true'
run: |
git pull
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A && git commit -m "📖 update currently reading"
git push origin main