diff --git a/.github/workflows/auto_messages_pot.yml b/.github/workflows/auto_messages_pot.yml index c290b6f..18e5c00 100644 --- a/.github/workflows/auto_messages_pot.yml +++ b/.github/workflows/auto_messages_pot.yml @@ -14,25 +14,23 @@ jobs: uses: actions/setup-python@v5 with: python-version: 3.11 + - name: Install dependencies run: | cd tools/readme_generator/ pip install -r requirements.txt + - name: Save old messges.pot for diffing later run: | cd tools/readme_generator/ cp messages.pot messages.pot.old + - name: Try to generate messages.pot run: | cd tools/readme_generator/ pybabel extract --ignore-dirs venv -F babel.cfg -o messages.pot . - - shell: pwsh - id: check_files_changed - run: | - $HasDiff = python .github/diff_pot_files.py tools/readme_generator/messages.pot.old tools/readme_generator/messages.pot - Write-Host "::set-output name=files_changed::$HasDiff" + - name: Create Pull Request - if: steps.check_files_changed.outputs.files_changed == 'true' uses: peter-evans/create-pull-request@v6 with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/autoblack.yml b/.github/workflows/autoblack.yml index 761222b..25c8e8b 100644 --- a/.github/workflows/autoblack.yml +++ b/.github/workflows/autoblack.yml @@ -15,15 +15,8 @@ jobs: with: options: "." continue-on-error: true - - shell: pwsh - id: check_files_changed - run: | - # Diff HEAD with the previous commit - $diff = git diff - $HasDiff = $diff.Length -gt 0 - Write-Host "::set-output name=files_changed::$HasDiff" + - name: Create Pull Request - if: steps.check_files_changed.outputs.files_changed == 'true' uses: peter-evans/create-pull-request@v6 with: token: ${{ secrets.GITHUB_TOKEN }}