-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1.11 KB
/
index.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
name: Index issues from configured GitHub repositories
on:
push:
branches: ['main']
workflow_dispatch:
schedule:
- cron: '0 8 * * *'
jobs:
call_api_job:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Setup Node.js and NPM
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install Dependencies
run: |
npm install axios
working-directory: ${{ github.workspace }}
- name: Run JavaScript File
id: fetchIssues
run: |
node ./content/issues/fetchIssues.js > ./content/issues/issues.json
cp ./content/issues/issues.json ./content/issues/issues.json.res
- name: Push into Git
run: |-
if ! diff -q ./content/issues/issues.json{,.res} > /dev/null
then
git config --global user.email "bot@ark-builders.dev"
git config --global user.name "ARK Builders Bot"
git add ./content/issues/issues.json
git commit -m "Indexing GitHub issues"
git push
fi