Skip to content

Commit 3d6d72c

Browse files
committed
fix(crowdin): use correct cwd
1 parent 0ae8d89 commit 3d6d72c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/translations-sync.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,27 +106,27 @@ jobs:
106106
- name: Install packages
107107
run: pnpm install --frozen-lockfile
108108

109+
- name: Patch version if the files changed
110+
working-directory: packages/i18n
111+
run: |
112+
CHANGED_FILES=$(git diff --name-only HEAD^1 HEAD)
113+
if [ -n "$CHANGED_FILES" ]; then
114+
pnpm version patch --no-git-tag-version
115+
fi
116+
109117
- name: Run ESLint
110118
working-directory: apps/site
111119
run: node --run lint:md -- --fix
112120

113121
- name: Run Prettier
114122
run: node --run prettier:fix
115123

116-
- name: Patch version if the files changed
117-
run: |
118-
CHANGED_FILES=$(git diff --name-only origin/main HEAD -- packages/website-i18n)
119-
if [ -n "$CHANGED_FILES" ]; then
120-
cd packages/website-i18n
121-
pnpm version patch --no-git-tag-version
122-
else
123-
124124
- name: Push Changes back to Pull Request
125125
uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v6.0.1
126126
with:
127127
commit_options: '--no-verify --signoff'
128128
commit_message: 'chore: automated format of translated files'
129-
branch: 'chore/crowdin'
129+
branch: ${{ env.BRANCH_NAME }}
130130

131131
- name: Save Lint Cache
132132
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3

0 commit comments

Comments
 (0)