Skip to content

Commit

Permalink
added dry run for branches
Browse files Browse the repository at this point in the history
  • Loading branch information
bniwredyc committed Dec 3, 2024
1 parent d16c4ca commit e686282
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ name: Upload to Crowdin
on:
push:
branches:
- "master"
- "*"

jobs:
build:
crowdin:
if: github.event.pull_request.head.repo.fork == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -21,7 +22,10 @@ jobs:
- name: Build resx files
run: npm run build:resx

- name: Sync translations
env:
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
run: npm run crowdin:upload
- name: Run Crowdin upload
run: |
if [ "${{ github.ref_name }}" = "master" ]; then
npm run crowdin:upload
else
npm run crowdin:upload:dryrun
fi
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"scripts": {
"lint": "markdownlint .",
"build:resx": "node build-resx.js",
"crowdin:upload": "crowdin upload"
"crowdin:upload": "crowdin upload",
"crowdin:upload:dryrun": "crowdin upload --dryrun"
},
"author": "",
"license": "ISC",
Expand Down

0 comments on commit e686282

Please sign in to comment.