Skip to content

Fenix - Uplift Strings #501

Fenix - Uplift Strings

Fenix - Uplift Strings #501

# 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: Fenix - Uplift Strings
on:
schedule:
- cron: "0 2 * * *"
workflow_dispatch:
jobs:
main:
name: Uplift strings
runs-on: ubuntu-latest
steps:
- name: Discover Fenix beta version
id: discover-beta-version
uses: mozilla-mobile/fenix-beta-version@4.2.3
- name: Skip non-beta versions
uses: andymckay/cancel-action@0.2
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/sync-strings-action@3.0.1
with:
toml_path: fenix/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-fenix-strings-${{ steps.discover-beta-version.outputs.beta_version }}
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
commit-message: "Uplift Fenix strings from ${{ github.ref_name }} to ${{ steps.env-variables.outputs.beta_branch }}"
title: "Uplift Fenix 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 }}`"