Skip to content

[Snyk] Security upgrade jinja2 from 3.1.2 to 3.1.5 #431

[Snyk] Security upgrade jinja2 from 3.1.2 to 3.1.5

[Snyk] Security upgrade jinja2 from 3.1.2 to 3.1.5 #431

name: Extract Strings
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
extract_strings:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.x
- name: Create translations directory
run: mkdir -vp locales
- name: Extract strings
run: |
sudo apt-get install -y gettext
xgettext -o locales/strings.pot --language=Python --add-comments --sort-output --from-code=UTF-8 $(find . -name "*.py") --verbose
- name: Commit and push updated POT file
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add locales/strings.pot
git commit -m "Update POT file" || echo "No changes to commit"
git push origin "HEAD:${{ github.ref }}" || echo "No changes to push"
env:
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}