Skip to content

Check for Updates - Lore Books #25387

Check for Updates - Lore Books

Check for Updates - Lore Books #25387

# This workflow runs every five minutes to check for a new manifest
name: Check for Updates - Lore Books
on:
workflow_dispatch:
schedule:
- cron: '30 * * * *'
jobs:
build:
runs-on: ubuntu-latest
environment: github
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
with:
ref: lore-books
- name: Install Node
uses: actions/setup-node@v2.1.2
with:
node-version: '14.x'
- name: yarn install
uses: bahmutov/npm-install@v1.1.0
- name: Check for manifest update
run: yarn manifest:check
env:
API_KEY: ${{ secrets.API_KEY }}
SKIP_CHECK: 'false'
- name: Check for new files
id: data
run: echo ::set-output name=porcelain::"$(git status --porcelain)"
- name: Commit latest manifest version
if: steps.data.outputs.porcelain
run: |
git config --local user.email "action@github.com"
git config --local user.name "D2 Grimoire Epub Bot"
git checkout --orphan tmp-lore-books
git add -A
git commit -m 'Grimoire Generated'
git branch -D lore-books
git branch -m lore-books
git push -f origin lore-books