Build processed json #5498
This file contains hidden or 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
| 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 != '' }} |