-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.37 KB
/
main.yml
File metadata and controls
45 lines (38 loc) · 1.37 KB
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
name: Build processed json
on:
push:
branches: [ "master" ]
paths:
- 'source.json'
schedule:
- cron: '37 1/2 * * *'
workflow_dispatch:
concurrency:
group: plugin-info
jobs:
build-plugins-info:
runs-on: ubuntu-latest
env:
callback_uri: ${{ secrets.callback_uri }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
ref: data
path: ./data
- name: Move original output.json
run: mv ./data/output.json ./data/old_output.json
- name: Download DataProcessor
run: gh release download -R instantsc/PluginBrowser -p DataProcessor && chmod +x ./DataProcessor
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build processed json
run: cat source.json | ./DataProcessor build > data/output.json && cat data/output.json
env:
gh_token: ${{ secrets.GITHUB_TOKEN }}
- name: Update the data branch
run: git add output.json && git config user.name "instant.sc" && git config user.email "code@insc.cc" && git commit -m "Add processed output from ${{ github.sha }}" && git push
working-directory: ./data
- name: Build and post release notes
run: ./DataProcessor post-updates ./data/output.json ./data/old_output.json ${{ env.callback_uri }}
if: ${{ env.callback_uri != '' }}