mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-13 16:47:34 -06:00
56 lines
1.2 KiB
YAML
56 lines
1.2 KiB
YAML
name: Update translation strings
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 5 * * *'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
env:
|
|
LOCALE: "en"
|
|
|
|
jobs:
|
|
makemessages:
|
|
if: github.repository == 'netbox-community/netbox'
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
NETBOX_CONFIGURATION: netbox.configuration_testing
|
|
|
|
steps:
|
|
- name: Create app token
|
|
uses: actions/create-github-app-token@v1
|
|
id: app-token
|
|
with:
|
|
app-id: 1076524
|
|
private-key: ${{ secrets.HOUSEKEEPING_SECRET_KEY }}
|
|
|
|
- name: Check out repo
|
|
uses: actions/checkout@v4
|
|
with:
|
|
token: ${{ steps.app-token.outputs.token }}
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: 3.11
|
|
|
|
- name: Install system dependencies
|
|
run: sudo apt install -y gettext
|
|
|
|
- name: Install Python dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
- name: Run makemessages
|
|
run: python netbox/manage.py makemessages -l ${{ env.LOCALE }}
|
|
|
|
- name: Commit changes
|
|
uses: EndBug/add-and-commit@v9
|
|
with:
|
|
add: 'netbox/translations/'
|
|
default_author: github_actions
|
|
message: 'Update source translation strings'
|