From 46f03c476a5147d0cbfa5a64ce4c91bf2496b1ac Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sun, 25 Aug 2024 23:18:28 +0800 Subject: [PATCH] Try update catalogs workflow again --- .github/workflows/update-catalogs.yml | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/update-catalogs.yml diff --git a/.github/workflows/update-catalogs.yml b/.github/workflows/update-catalogs.yml new file mode 100644 index 000000000..b8e294e87 --- /dev/null +++ b/.github/workflows/update-catalogs.yml @@ -0,0 +1,32 @@ +name: Update Catalogs + +on: + push: + branches: + - l10n_main + workflow_dispatch: + +jobs: + update-catalogs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: l10n_main + - 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:l10n_main + fi