diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 4202fa21def..ffccc451c24 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -33,6 +33,18 @@ jobs: - name: Install dependencies run: composer update --prefer-stable --prefer-dist --no-progress --no-interaction + - name: Adding missing locales + id: locales + if: success() + run: | + IS_DIRTY=1 + + vendor/bin/lang create + + { git add . && git commit -a -m "✏️ Adding missing locales"; } || IS_DIRTY=0 + + echo "is_dirty=${IS_DIRTY}" >> "$GITHUB_OUTPUT" + - name: Keys actualization id: keys if: success() @@ -41,7 +53,7 @@ jobs: vendor/bin/lang sync - { git add . && git commit -a -m "🔑 Updated keys"; } || IS_DIRTY=0 + { git add . && git commit -a -m "🔑 Synchronization of translation keys"; } || IS_DIRTY=0 echo "is_dirty=${IS_DIRTY}" >> "$GITHUB_OUTPUT" @@ -53,13 +65,14 @@ jobs: vendor/bin/lang status - { git add . && git commit -a -m "📃 Updated status of translations"; } || IS_DIRTY=0 + { git add . && git commit -a -m "📃 Translation statuses have been updated"; } || IS_DIRTY=0 echo "is_dirty=${IS_DIRTY}" >> "$GITHUB_OUTPUT" - name: Push changes uses: ad-m/github-push-action@master if: success() && + steps.locales.outputs.is_dirty == 1 || steps.keys.outputs.is_dirty == 1 || steps.status.outputs.is_dirty == 1 with: @@ -69,6 +82,7 @@ jobs: uses: myrotvorets/trigger-repository-dispatch-action@v2.0.0 if: | success() && ( + steps.locales.outputs.is_dirty == 1 || steps.keys.outputs.is_dirty == 1 || steps.status.outputs.is_dirty == 1 )