2023-03-14 18:50:13 +00:00
|
|
|
name: Fix locale issues
|
2022-12-25 18:49:59 +00:00
|
|
|
|
|
|
|
on:
|
2023-01-15 11:04:57 +00:00
|
|
|
workflow_dispatch:
|
2022-12-25 18:49:59 +00:00
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- '**.xml'
|
2022-12-25 18:52:30 +00:00
|
|
|
branches:
|
|
|
|
- master
|
2022-12-25 18:49:59 +00:00
|
|
|
|
|
|
|
concurrency:
|
2023-03-14 18:50:13 +00:00
|
|
|
group: "locale"
|
2022-12-25 18:49:59 +00:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
create:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-01-06 21:27:23 +00:00
|
|
|
- name: Generate access token
|
|
|
|
id: generate_token
|
2024-01-03 09:24:28 +00:00
|
|
|
uses: tibdex/github-app-token@v2
|
2023-01-06 21:27:23 +00:00
|
|
|
with:
|
|
|
|
app_id: ${{ secrets.GH_APP_ID }}
|
|
|
|
private_key: ${{ secrets.GH_APP_KEY }}
|
|
|
|
repository: "recloudstream/cloudstream"
|
2024-01-03 09:24:28 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-01-06 21:27:23 +00:00
|
|
|
with:
|
|
|
|
token: ${{ steps.generate_token.outputs.token }}
|
2023-03-14 18:50:13 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
pip3 install lxml
|
2022-12-25 18:49:59 +00:00
|
|
|
- name: Edit files
|
|
|
|
run: |
|
|
|
|
python3 .github/locales.py
|
|
|
|
- name: Commit to the repo
|
|
|
|
run: |
|
2023-01-06 21:27:23 +00:00
|
|
|
git config --local user.email "111277985+recloudstream[bot]@users.noreply.github.com"
|
|
|
|
git config --local user.name "recloudstream[bot]"
|
2022-12-25 18:49:59 +00:00
|
|
|
git add .
|
|
|
|
# "echo" returns true so the build succeeds, even if no changed files
|
2023-03-14 18:50:13 +00:00
|
|
|
git commit -m 'chore(locales): fix locale issues' || echo
|
2022-12-25 18:52:30 +00:00
|
|
|
git push
|