update-translation-strings.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. name: Update translation strings
  2. on:
  3. schedule:
  4. - cron: '0 5 * * *'
  5. workflow_dispatch:
  6. permissions:
  7. contents: write
  8. env:
  9. LOCALE: "en"
  10. jobs:
  11. makemessages:
  12. runs-on: ubuntu-latest
  13. env:
  14. NETBOX_CONFIGURATION: netbox.configuration_testing
  15. steps:
  16. - name: Create app token
  17. uses: actions/create-github-app-token@v1
  18. id: app-token
  19. with:
  20. app-id: 1076524
  21. private-key: ${{ secrets.HOUSEKEEPING_SECRET_KEY }}
  22. - name: Check out repo
  23. uses: actions/checkout@v4
  24. with:
  25. token: ${{ steps.app-token.outputs.token }}
  26. - name: Set up Python
  27. uses: actions/setup-python@v5
  28. with:
  29. python-version: 3.11
  30. - name: Install system dependencies
  31. run: sudo apt install -y gettext
  32. - name: Install Python dependencies
  33. run: |
  34. python -m pip install --upgrade pip
  35. pip install -r requirements.txt
  36. - name: Run makemessages
  37. run: python netbox/manage.py makemessages -l ${{ env.LOCALE }}
  38. - name: Commit changes
  39. uses: EndBug/add-and-commit@v9
  40. with:
  41. add: 'netbox/translations/'
  42. default_author: github_actions
  43. message: 'Update source translation strings'