mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-22 16:46:28 +01:00
Move this to run locally instead of Actions
Seems like it can't run based on PR closed by another workflow, which make sense.
This commit is contained in:
parent
ca536723e9
commit
c54228627c
2 changed files with 5 additions and 30 deletions
30
.github/workflows/update-catalogs.yml
vendored
30
.github/workflows/update-catalogs.yml
vendored
|
@ -1,30 +0,0 @@
|
||||||
name: Update catalogs
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types:
|
|
||||||
- closed
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update-catalogs:
|
|
||||||
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
|
|
|
@ -70,6 +70,11 @@ export default defineConfig({
|
||||||
run: ['npm', 'run', 'messages:extract:clean'],
|
run: ['npm', 'run', 'messages:extract:clean'],
|
||||||
pattern: 'src/**/*.{js,jsx,ts,tsx}',
|
pattern: 'src/**/*.{js,jsx,ts,tsx}',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'update-catalogs',
|
||||||
|
run: ['node', 'scripts/catalogs.js'],
|
||||||
|
pattern: 'src/locales/*.po',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
splitVendorChunkPlugin(),
|
splitVendorChunkPlugin(),
|
||||||
|
|
Loading…
Reference in a new issue