Update #4
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: Update | |
on: | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- run: sudo apt-get install -y git-filter-repo mercurial | |
- run: sudo curl -O https://raw.githubusercontent.com/glandium/git-cinnabar/master/download.py | |
working-directory: /usr/local/bin | |
- run: sudo python download.py && sudo chmod a+rx git-cinnabar | |
working-directory: /usr/local/bin | |
- name: git config | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config fetch.prune true | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: | | |
while read lc; do | |
git remote add $lc hg::https://hg.mozilla.org/l10n-central/$lc/; | |
git fetch $lc; | |
git branch $lc $lc/branches/default/tip; | |
git push origin $lc || true; # ignore errors for 'fa' and 'nn-NO' | |
done < firefox-locales |