Update Add-on Info #1385
This file contains 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: Update Add-on Info | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "00 02 * * *" | |
defaults: | |
run: | |
working-directory: scripts/addon-parser | |
jobs: | |
add-on-update: | |
name: Update Add-ons | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Cache addon-parser npm node nodules | |
uses: actions/cache@v4 | |
id: nodecache | |
with: | |
path: | | |
~/.npm | |
scripts/addon-parser/node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('scripts/addon-parser/package.json') }} | |
- name: Set Node Version | |
uses: actions/setup-node@master | |
with: | |
node-version: 18.x | |
- name: Install dependencies | |
if: steps.nodecache.outputs.cache-hit != 'true' | |
run: npm install | |
- name: Run addon-parser and get site stats | |
run: node app.js --kv=omega --getstats | |
- name: Push new files back | |
uses: mikeal/publish-to-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH_NAME: "main" |