Skip to content

Update wcms-modules.json #577

Update wcms-modules.json

Update wcms-modules.json #577

name: Update wcms-modules.json
on:
workflow_dispatch:
schedule:
# Run daily at 3am
- cron: '0 3 * * *'
jobs:
update-wcms-modules:
name: Update wcms-modules.json
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Build wcms-modules.json
run: node build-wcms-modules.js
- name: Commit result
run: |
set -e
git config user.name github-actions
git config user.email [email protected]
# Commit only if there has been changes
if [[ -n $(git status --porcelain wcms-modules.json) ]]; then
git add wcms-modules.json
git commit -m "Autoupdate wcms-modules.json"
git push
else
echo "No changes to wcms-modules.json"
fi