mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-06-13 02:39:23 +00:00
34 lines
976 B
YAML
34 lines
976 B
YAML
name: Update locales
|
|
|
|
on:
|
|
push:
|
|
# run this workflow when someone pushes to the l10n_main branch
|
|
branches: [ l10n_main ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
# Create the mock file for the update_locales command to work, otherwise
|
|
# we'll get an 'no such file' error
|
|
- name: Create mock .env file
|
|
run: echo "DEBUG=true" > .env
|
|
|
|
- name: Run update_locales command
|
|
run: ./bw-dev update_locales
|
|
|
|
- name: Run update_locales and commit changes
|
|
run: |
|
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
git config user.name "github-actions[bot]"
|
|
git fetch origin main:main
|
|
git switch main
|
|
git fetch origin l10n_main:l10n_main
|
|
./bw-dev update_locales
|
|
git add -A
|
|
git commit -a -m "[GitHub Action] Update locales"
|
|
git push -u origin main
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|