Skip to content

Pontoon/AMO Frontend: Update Portuguese (Brazil) (pt-BR) #2707

Pontoon/AMO Frontend: Update Portuguese (Brazil) (pt-BR)

Pontoon/AMO Frontend: Update Portuguese (Brazil) (pt-BR) #2707

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
jobs:
context:
runs-on: ubuntu-latest
outputs:
is_fork: ${{ steps.context.outputs.is_fork }}
is_default_branch: ${{ steps.context.outputs.is_default_branch }}
steps:
- uses: actions/checkout@v5
- id: context
uses: ./.github/actions/context
locales:
needs: context
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
persist-credentials: ${{ needs.context.outputs.is_default_branch }}
- uses: actions/setup-node@v6
with:
node-version: 20
package-manager-cache: false
- name: Install gettext
run: sudo apt-get install gettext
- name: Yarn install
run: yarn install --frozen-lockfile --prefer-offline
- name: Extract locales
run: yarn extract-locales
- name: Push Locales
env:
is_fork: ${{ needs.context.outputs.is_fork }}
event_name: ${{ github.event_name }}
is_default_branch: ${{ needs.context.outputs.is_default_branch }}
is_push: ${{ github.event_name == 'push' }}
run: |
# Keep this logic in sync with addons-server
if [[ "$is_fork" == 'true' ]]; then
cat <<'EOF'
Github actions are not authorized to push from workflows triggered by forks.
We cannot verify if the l10n extraction push will work or not.
Please submit a PR from the base repository if you are modifying l10n extraction scripts.
EOF
exit 0
fi
if [[ "$is_default_branch" == 'true' && "$is_push" == 'true' ]]; then
args=""
else
args="--dry-run"
fi
./bin/push-locales $args