Skip to content

i18n Updater

i18n Updater #48

Workflow file for this run

name: i18n Updater
# This Workflow will periodically go in:
# 1. update the i18n repo.
# 2. file a pr.
# 3. approve the pr.
# 4. Mark is as auto merge, which means, if CI does pass, this will be merged automatically.
on:
schedule:
- cron: "0 6 * * *" # Every Day 6:00 UTC
workflow_dispatch:
permissions:
pull-requests: write
contents: write
jobs:
main:
name: Update Main Branch Languages
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: "true"
- name: Checkout mozilla-vpn-client-l10n Git
run: |
git submodule update --init --remote src/_locales
- uses: peter-evans/create-pull-request@v6
id: cpr
with:
# This may not be github, cuz gh actions cannot self approve
author: GitHub <[email protected]>
committer: GitHub <[email protected]>
commit-message: "[Bot] Update i18n"
branch: i18n_automation
delete-branch: true
title: "[Bot] Update i18n"
token: ${{ secrets.GITHUB_TOKEN }}
# Finally, this sets the PR to allow auto-merging for patch and minor
# updates if all checks pass
- name: Enable auto-merge the i18n PR
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ steps.cpr.outputs.pull-request-url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}