Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add job to push Transifex strings #8904

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/tx-push.yml
Original file line number Diff line number Diff line change
@@ -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 }}
2 changes: 1 addition & 1 deletion bin/tx-push-www
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ glob('src/views/**/l10n.json', {}, function (er, files) {

let cmd;
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) {
// push all the source files to transifex - force update
process.stdout.write(`running command: ${cmd}\n`);
Expand Down