Merge pull request #8904 from scratchfoundation/tx-push
Some checks are pending
CI/CD / build-and-test-and-maybe-deploy (push) Waiting to run
Transifex Push / transifex-push (push) Waiting to run

ci: add job to push Transifex strings
This commit is contained in:
Christopher Willis-Ford 2024-11-12 07:24:24 -08:00 committed by GitHub
commit d4cd72d6b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 27 additions and 1 deletions

26
.github/workflows/tx-push.yml vendored Normal file
View file

@ -0,0 +1,26 @@
name: Transifex Push
on:
push: # Runs whenever a commit is pushed to the repository
branches: [master, develop, release/*] # ...on any of these branches
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
jobs:
transifex-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
cache: 'npm'
node-version-file: '.nvmrc'
- name: info
run: |
echo "Scratch environment: ${{ vars.SCRATCH_ENV }}"
echo "Node version: $(node --version)"
echo "NPM version: $(npm --version)"
- run: npm ci
- name: push strings to Transifex
run: npm run i18n:push --execute
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}

View file

@ -69,7 +69,7 @@ glob('src/views/**/l10n.json', {}, function (er, files) {
let cmd; let cmd;
resources.forEach(resource => { resources.forEach(resource => {
cmd = `$(npm bin)/tx-push-src scratch-website ${resource.resourceName} ${resource.filename}`; cmd = `tx-push-src scratch-website ${resource.resourceName} ${resource.filename}`;
if (execute) { if (execute) {
// push all the source files to transifex - force update // push all the source files to transifex - force update
process.stdout.write(`running command: ${cmd}\n`); process.stdout.write(`running command: ${cmd}\n`);