Browse Source

Proper if and only skip pull request

CPK 5 months ago
parent
commit
700f060137
1 changed files with 6 additions and 4 deletions
  1. 6 4
      .github/workflows/localization.yml

+ 6 - 4
.github/workflows/localization.yml

@@ -53,7 +53,7 @@ jobs:
   download:
     name: "Download changes"
     runs-on: ubuntu-latest
-    if: ${{ inputs.mode == 'Upload only' }}
+    if: ${{ inputs.mode != 'Upload only' }}
     steps:
       - name: Checkout
         uses: actions/[email protected]
@@ -72,10 +72,12 @@ jobs:
           git config --global user.email "github-actions[bot]@users.noreply.github.com"
           git add -A
           git commit -m "Update language files"
-      # - name: Push changes
-      #   run: |
-      #     git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)
+      - name: Push changes
+        if: ${{ steps.download-languages.outputs.hasChanges == 'true' }}
+        run: |
+          git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)
       # - name: Create Pull Request
+      #   if: ${{ steps.download-languages.outputs.hasChanges == 'true' }}
       #   run: |
       #     gh pr create --title "Language Update ${{ github.run_number }}" \
       #           --body "This PR was created automatically.