Check for Updates - Omnibus #25394
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
# This workflow runs every five minutes to check for a new manifest | |
name: Check for Updates - Omnibus | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 * * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: github | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2.3.4 | |
- 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 | |
git add -A | |
git commit -m 'Grimoire Generated' | |
git branch -D master | |
git branch -m master | |
git push -f origin master |