mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-24 18:25:41 +03:00
33 lines
920 B
YAML
33 lines
920 B
YAML
name: Update catalogs
|
|
|
|
on:
|
|
pull_request_target:
|
|
types:
|
|
- closed
|
|
branches:
|
|
- l10n_main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
update-catalogs:
|
|
if: github.event.pull_request.merged == true
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
- run: npm ci
|
|
- name: Update catalogs.json
|
|
run: |
|
|
node scripts/catalogs.js
|
|
if git diff --quiet src/data/catalogs.json; then
|
|
echo "No changes to catalogs.json"
|
|
else
|
|
echo "Changes to catalogs.json"
|
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
git config --global user.name "github-actions[bot]"
|
|
git add src/data/catalogs.json
|
|
git commit -m "Update catalogs.json"
|
|
git push origin HEAD:main
|
|
fi
|