Skip to content

Update legacy json #1269

Update legacy json

Update legacy json #1269

Workflow file for this run

name: Update legacy json
on:
workflow_dispatch:
schedule:
- cron: "0 13 * * *"
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.MIRRORZ_JSON_LEGACY_PAT }}
submodules: true
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Prepare parser and config
run: |
git clone https://github.com/mirrorz-org/mirrorz-parser.git parser
git clone https://github.com/mirrorz-org/mirrorz-config.git config
git clone https://github.com/mirrorz-org/mirrorz-d-extension.git mirrorz-d-extension
ln -s config/mirrorz.org.json config/config.json
ln -s ../config/config.json parser/config.json
- name: Update json if there is any change
env:
ACTOR: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "Mirrorz Bot"
git config user.email "[email protected]"
pushd parser && yarn && popd
printf "legacy: update json\n\n" > commit-msg
node update.js | tee -a commit-msg | grep -e ': update$' && (git add data/ ; git commit -aF commit-msg)
rm commit-msg
- name: Push to master
run: |
git push