|
1 | | -# SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors |
2 | | -# SPDX-License-Identifier: GPL-3.0-or-later |
| 1 | +# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors |
| 2 | +# SPDX-License-Identifier: MIT |
| 3 | + |
3 | 4 | name: L10n |
4 | 5 | on: pull_request |
5 | 6 |
|
| 7 | +permissions: |
| 8 | + contents: read |
| 9 | + |
6 | 10 | jobs: |
7 | 11 | l10n-extract-check: |
8 | 12 | runs-on: ubuntu-latest |
| 13 | + |
9 | 14 | name: Pot check |
10 | 15 | steps: |
11 | | - - name: Checkout |
12 | | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
13 | | - |
14 | | - - name: Read package.json node and npm engines version |
15 | | - uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 |
16 | | - id: versions |
17 | | - with: |
18 | | - fallbackNode: '^20' |
19 | | - fallbackNpm: '^10' |
20 | | - |
21 | | - - name: Set up node ${{ steps.versions.outputs.nodeVersion }} |
22 | | - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v3 |
23 | | - with: |
24 | | - node-version: ${{ steps.versions.outputs.nodeVersion }} |
25 | | - |
26 | | - - name: Set up npm ${{ steps.versions.outputs.npmVersion }} |
27 | | - run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" |
28 | | - |
29 | | - - name: Install dependencies |
30 | | - env: |
31 | | - CYPRESS_INSTALL_BINARY: 0 |
32 | | - PUPPETEER_SKIP_DOWNLOAD: true |
33 | | - run: npm ci |
34 | | - |
35 | | - - name: Extract l10n files |
36 | | - run: npm run l10n:extract |
37 | | - |
38 | | - - name: Check l10n file changes |
39 | | - run: bash -c "[[ ! \"`git status --porcelain l10n`\" ]] || ( echo 'Uncommited l10n changes. Run `npm l10n:extract`.' && git status && exit 1 )" |
| 16 | + - name: Checkout |
| 17 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 18 | + with: |
| 19 | + persist-credentials: false |
| 20 | + |
| 21 | + - name: Set up node |
| 22 | + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 |
| 23 | + with: |
| 24 | + node-version-file: 'package.json' |
| 25 | + |
| 26 | + - name: Install dependencies |
| 27 | + run: npm ci |
| 28 | + |
| 29 | + - name: Extract l10n files |
| 30 | + run: npm run l10n:extract |
| 31 | + |
| 32 | + - name: Check l10n file changes |
| 33 | + run: bash -c "[[ ! \"`git status --porcelain l10n`\" ]] || ( echo 'Uncommited l10n changes. Run \`npm run l10n:extract\`.' && exit 1 )" |
0 commit comments