AC - Uplift Strings #572
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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/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: 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 }}`" |