From e47a494cc1c47dd8e75077a761b202ebed62b21a Mon Sep 17 00:00:00 2001 From: MelanX Date: Sat, 24 Aug 2024 13:30:17 +0200 Subject: [PATCH] Hopefully fix pr translation check workflow this time --- mod_workflows/check_pr_translations.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mod_workflows/check_pr_translations.yml b/mod_workflows/check_pr_translations.yml index 7b8a798..c93c840 100644 --- a/mod_workflows/check_pr_translations.yml +++ b/mod_workflows/check_pr_translations.yml @@ -2,7 +2,7 @@ name: Check Localization Files on: - pull_request: + pull_request_target: paths: - 'src/main/resources/assets/**/lang/*.json' @@ -17,13 +17,15 @@ jobs: - name: Check out code uses: actions/checkout@v4 with: + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} fetch-depth: 0 - name: Check localization files run: | PR_NUMBER=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") # Get the list of added or modified localization files - FILES=$(gh pr diff $PR_NUMBER --name-only) + FILES=$(gh pr diff $PR_NUMBER --name-only | grep -E 'src/main/resources/assets/.*/lang/.*\.json') # Initialize an array to store the missing keys MISSING_KEYS=() # Iterate over each file