Skip to content

Update Extension Index #194

Update Extension Index

Update Extension Index #194

Workflow file for this run

name: Update Extension Index
on:
schedule:
- cron: '0 */6 * * *' # Every 6 hours
workflow_dispatch: # Allow manual trigger
jobs:
update-index:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js 22
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Update extension index
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run start
- name: Check for changes
id: git-check
run: |
git diff --exit-code extindex.json || echo "changed=true" >> $GITHUB_OUTPUT
- name: Commit and push changes
if: steps.git-check.outputs.changed == 'true'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add extindex.json
git commit -m "Update extension index - $(date -u '+%Y-%m-%d %H:%M:%S UTC')"
git push