File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Update locales
2+
3+ on :
4+ schedule :
5+ - cron : " 0 0 * * 5" # Every Friday at midnight UTC
6+ workflow_dispatch : # Allow manual triggering
7+
8+ permissions :
9+ contents : write
10+ pull-requests : write
11+
12+ jobs :
13+ update-locales :
14+ name : Update locales
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - name : Checkout repository
19+ uses : actions/checkout@v6
20+
21+ - name : Use Node.js LTS
22+ uses : actions/setup-node@v6
23+ with :
24+ node-version : lts/*
25+
26+ - name : Install dependencies
27+ run : npm ci
28+
29+ - name : Import translations from mozilla-central
30+ run : npx gulp importl10n
31+
32+ - name : Create Pull Request
33+ env :
34+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
35+ run : |
36+ if [ -z "$(git status --porcelain l10n/)" ]; then
37+ echo "No locale changes to commit."
38+ exit 0
39+ fi
40+ git config user.name "github-actions[bot]"
41+ git config user.email "github-actions[bot]@users.noreply.github.com"
42+ git switch -C update-locales
43+ git add l10n/
44+ git commit -m "l10n: Update locale files"
45+ git push --force origin update-locales
46+ gh pr create \
47+ --title "l10n: Update locale files" \
48+ --body "Automated weekly update of locale files from mozilla-central." \
49+ --label l10n || true
You can’t perform that action at this time.
0 commit comments