-
Couldn't load subscription status.
- Fork 695
Auto Update Locale Files #780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Andrew-Chen-Wang
merged 3 commits into
jazzband:master
from
dpgraham4401:locale_auto_update
May 1, 2024
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,63 +1,47 @@ | ||
| name: Locale Updater | ||
| name: Update locale files | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - main | ||
| - master | ||
|
|
||
|
|
||
| jobs: | ||
| locale-updater: | ||
| name: Locale updater | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| pull-requests: write | ||
| contents: write | ||
| if: github.repository == 'jazzband/djangorestframework-simplejwt' | ||
| name: Locale updater | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repo | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| ref: ${{ github.head_ref }} | ||
|
|
||
| - name: Set up Python 3.9 | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: '3.9' | ||
|
|
||
| - name: Get pip cache dir | ||
| id: pip-cache | ||
| run: | | ||
| echo "::set-output name=dir::$(pip cache dir)" | ||
|
|
||
| - name: Cache | ||
| uses: actions/cache@v2 | ||
| with: | ||
| path: ${{ steps.pip-cache.outputs.dir }} | ||
| key: | ||
| 3.9-v1-${{ hashFiles('**/setup.py') }} | ||
| restore-keys: | | ||
| 3.9-v1- | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| sudo apt-get install -y gettext | ||
| python -m pip install --upgrade pip wheel setuptools | ||
| pip install -e .[dev] | ||
|
|
||
| - name: Run locale | ||
| working-directory: rest_framework_simplejwt | ||
| run: | | ||
| python ../scripts/i18n_updater.py | ||
|
|
||
| - name: Create Pull Request | ||
| uses: peter-evans/create-pull-request@v5 | ||
| id: auto-commit-action | ||
| with: | ||
| branch: i18n-auto-update | ||
| title: "[i18n] Update" | ||
| body: "Updated locale files on master branch" | ||
| commit-message: "Update locale files" | ||
| add-paths: rest_framework_simplejwt/locale/** | ||
| delete-branch: true | ||
dpgraham4401 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - name: Tell whether locale updated | ||
| run: echo "Locale files updated" | ||
|
|
||
| - name: Checkout Repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.12' | ||
| cache: 'pip' | ||
| cache-dependency-path: setup.py | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| sudo apt-get install -y gettext | ||
| python -m pip install --upgrade pip wheel setuptools | ||
| pip install -e .[dev] | ||
|
|
||
| - name: Run locale Update Script | ||
| run: python scripts/i18n_updater.py | ||
|
|
||
| - name: Create Pull Request | ||
| uses: peter-evans/create-pull-request@v6 | ||
| with: | ||
| branch: i18n-auto-update | ||
| title: "[i18n] Update" | ||
| body: "Updated locale files on trunk" | ||
| commit-message: "Update locale files" | ||
| add-paths: rest_framework_simplejwt/locale/** | ||
| delete-branch: true | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.