@@ -13,7 +13,6 @@ permissions:
1313
1414env :
1515 PLUGIN_SLUG : optimizations-ace-mc
16- POT_FILE : languages/optimizations-ace-mc.pot
1716
1817jobs :
1918 update-pot :
@@ -22,12 +21,12 @@ jobs:
2221
2322 steps :
2423 - name : Checkout code
25- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
24+ uses : actions/checkout@v6
2625 with :
2726 fetch-depth : 0
2827
2928 - name : Setup PHP
30- uses : shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # v2
29+ uses : shivammathur/setup-php@v2
3130 with :
3231 php-version : ' 8.2'
3332 coverage : none
4039
4140 - name : Regenerate .pot file
4241 run : |
42+ POT_FILE="languages/${PLUGIN_SLUG}.pot"
4343 mkdir -p "$(dirname "$POT_FILE")"
4444
4545 wp i18n make-pot . "$POT_FILE" \
5353 - name : Check for changes
5454 id : changes
5555 run : |
56+ POT_FILE="languages/${PLUGIN_SLUG}.pot"
57+
5658 if git diff --quiet --ignore-matching-lines='^"POT-Creation-Date:' -- "$POT_FILE"; then
5759 echo "has_changes=false" >> "$GITHUB_OUTPUT"
5860 echo "Translation file is up to date"
6971
7072 - name : Create Pull Request
7173 if : steps.changes.outputs.has_changes == 'true'
72- uses : peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8
74+ uses : peter-evans/create-pull-request@v8
7375 with :
7476 commit-message : ' chore(i18n): regenerate translation template'
7577 title : ' chore(i18n): Update translation template (.pot file)'
9092
9193 ---
9294 *This PR was automatically generated by the [Update Translation File](https://github.com/${{ github.repository }}/blob/main/.github/workflows/update-pot-file.yml) workflow.*
93- add-paths : ${{ env.POT_FILE }}
95+ add-paths : languages/ ${{ env.PLUGIN_SLUG }}.pot
9496 branch : chore/update-pot-file
9597 base : main
9698 delete-branch : true
0 commit comments