forked from DestinyItemManager/d2-manifest-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.17 KB
/
check-for-updates-omnibus.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
41
42
43
44
45
# 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