Skip to content

Commit

Permalink
Add ChatGPT suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesbvll committed Mar 15, 2024
1 parent ce145d0 commit 974eccc
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/update_trans_docs_text.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Update Text and Language Files

on:
schedule:
- cron: '0 0 * * *' # Runs every day at midnight. Adjust the timing as needed.
workflow_dispatch: # Allows you to manually trigger the workflow.

jobs:
update-and-pr:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Update Text and Languages for All Locales
run: |
cd doc
make update-text
for langDir in locales/*; do
if [ -d "$langDir" ]; then
lang=$(basename $langDir)
echo "Updating language $lang"
make update-lang lang=$lang
fi
done
- name: Commit changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update text and language files" || echo "No changes to commit"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: 'create-pr-branch' # This is the branch where changes will be pushed

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: 'create-pr-branch' # Ensure this matches the branch above
delete-branch: true
title: 'Update text and language files'
body: 'This PR is auto-generated to update text and language files.'
draft: false

0 comments on commit 974eccc

Please sign in to comment.