Skip to content

Commit 19bba22

Browse files
authored
Add Crowdin pull request formatting step to workflow
Signed-off-by: Aviv Keller <[email protected]>
1 parent a7a5a34 commit 19bba22

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.github/workflows/translations-sync.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,27 @@ jobs:
5656
# Created from https://crowdin.com/settings#api-key logged in using nodejs-crowdin-bot
5757
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
5858

59+
format_crowdin_pull_request:
60+
needs: synchronize-with-crowdin
61+
runs-on: ubuntu-latest
62+
63+
permissions:
64+
# This permission is required by `stefanzweifel/git-auto-commit-action`
65+
contents: write
66+
67+
steps:
68+
- name: Harden Runner
69+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
70+
with:
71+
egress-policy: audit
72+
73+
- name: Git Checkout
74+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
75+
with:
76+
ref: ${{ env.BRANCH_NAME }}
77+
token: ${{ secrets.CROWDIN_GITHUB_BOT_TOKEN }}
78+
fetch-depth: -1
79+
5980
- name: Restore Lint Cache
6081
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
6182
with:
@@ -87,10 +108,10 @@ jobs:
87108

88109
- name: Run ESLint
89110
working-directory: apps/site
90-
run: sudo node --run lint:md -- --fix
111+
run: node --run lint:md -- --fix
91112

92113
- name: Run Prettier
93-
run: sudo node --run prettier:fix
114+
run: node --run prettier:fix
94115

95116
- name: Patch version if the files changed
96117
run: |

0 commit comments

Comments
 (0)