Skip to content

Commit

Permalink
Merge pull request #3632 from Laravel-Lang/andrey-helldar-patch-1
Browse files Browse the repository at this point in the history
[core]: Added checking for missing locales when running GitHub Actions
  • Loading branch information
andrey-helldar authored Nov 7, 2023
2 parents 68215d7 + 079f275 commit b9b4d29
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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"
Expand All @@ -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:
Expand All @@ -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
)
Expand Down

0 comments on commit b9b4d29

Please sign in to comment.