diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index a48ac6beb..379a610db 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -19,14 +19,3 @@ jobs: - run: xvfb-run -a npm run test if: runner.os == 'Linux' - run: npx @vscode/vsce package - check-translations: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version-file: ".nvmrc" - cache: "npm" - - run: npm ci - - run: npm run locale --update-locales - - run: git diff --exit-code diff --git a/.github/workflows/translations.yml b/.github/workflows/translations.yml new file mode 100644 index 000000000..75742bb5e --- /dev/null +++ b/.github/workflows/translations.yml @@ -0,0 +1,29 @@ +name: Translation Check + +on: + workflow_dispatch: + push: + branches: + - main + +jobs: + check-translations: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version-file: ".nvmrc" + cache: "npm" + - run: npm ci + - run: npm run locale --update-locales + - run: | + CHANGES=$(git diff --name-only) + if [ -z "$CHANGES" ] + then + echo "No translations needed" + else + echo "The following files need translations:" + echo $CHANGES + exit 1 + fi