Skip to content

Add package: wisr-reporter.mpackage (#430) #368

Add package: wisr-reporter.mpackage (#430)

Add package: wisr-reporter.mpackage (#430) #368

name: Refresh json index
on:
push:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
reindex-json-file:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'Mudlet' }}
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- uses: leafo/gh-actions-lua@v10
- uses: leafo/gh-actions-luarocks@v4
- name: Install apt dependencies
run: sudo apt-get install -y libzzip-dev libyajl-dev
- name: Install luarocks modules
run: |
luarocks install json-lua
luarocks install luazip
luarocks install luafilesystem
luarocks install lua-yajl YAJL_LIBDIR=`find /usr -name "libyajl.so" -printf '%h\n'` YAJL_INCDIR=/usr/include
# Fix timestamps
- name: restore timestamps
uses: chetan/git-restore-mtime-action@v2
- name: Run indexing
run: |
lua reindex.lua
# Commit all changed files back to the repository
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Automated package index update.
file_pattern: 'packages/*.packages.json packages/icons/*'