Skip to content

AC - Uplift Strings #628

AC - Uplift Strings

AC - Uplift Strings #628

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/
name: AC - Uplift Strings
on:
schedule:
- cron: "0 2 * * *"
workflow_dispatch:
jobs:
main:
name: Uplift strings
runs-on: ubuntu-latest
steps:
- name: Discover A-C beta version
id: discover-beta-version
uses: mozilla-mobile/[email protected]
- name: Skip non-beta versions
uses: andymckay/[email protected]
if: ${{ steps.discover-beta-version.outputs.beta_version == '' }}
- name: Store ENV variables
id: env-variables
run: |
echo "beta_branch=releases_v${{ steps.discover-beta-version.outputs.beta_version }}" >> $GITHUB_OUTPUT
- name: Checkout main branch
uses: actions/checkout@v3
with:
path: main
ref: main
- name: Checkout beta branch
uses: actions/checkout@v3
with:
path: beta
ref: ${{ steps.env-variables.outputs.beta_branch }}
- name: Sync strings
uses: mozilla-mobile/[email protected]
with:
toml_path: android-components/l10n.toml
src: main
dest: beta
- name: Create pull request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: beta
branch: automation/uplift-ac-strings-${{ steps.discover-beta-version.outputs.beta_version }}
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
commit-message: "Uplift AC strings from ${{ github.ref_name }} to ${{ steps.env-variables.outputs.beta_branch }}"
title: "Uplift AC strings from ${{ github.ref_name }} to ${{ steps.env-variables.outputs.beta_branch }}"
body: "This (automated) PR uplifts strings from `${{ github.ref_name }}` to `${{ steps.env-variables.outputs.beta_branch }}`"