Skip to content

Fix workflow

Fix workflow #2

Workflow file for this run

name: Build and Update Registry
on:
push:
branches:
- main
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.actor != 'github-actions[bot]' && github.event_name != 'push' || github.event.pusher.name != 'github-actions[bot]' }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache npm dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install npm dependencies
run: npm ci
- name: Build the registry
run: |
npm run build-registry --yes
env:
CI: true
- name: Update repository
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add registry
if git diff --cached --quiet; then
echo "No changes in registry, skipping commit."
exit 0
else
git commit -m "Update registry"
git push origin main
fi