diff --git a/.github/workflows/catalog-updates-check.yaml b/.github/workflows/catalog-updates-check.yaml index 9c12f628bae..7be58682149 100644 --- a/.github/workflows/catalog-updates-check.yaml +++ b/.github/workflows/catalog-updates-check.yaml @@ -20,11 +20,13 @@ jobs: - name: Check if latest-dev was modified shell: bash {0} id: check_updated + env: + GITHUB_TOKEN: ${{ secrets.ORG_AUTOMATION_TOKEN }} + PR_NUMBER: ${{ github.event.number }} run: | file="sql/updates/latest-dev.sql" updated=0 - # diff=$(git diff --name-status origin/main | grep "${file}") - diff=$(git --no-pager diff --name-only HEAD $(git merge-base HEAD ${{ github.event.pull_request.base.sha }}) | grep "${file}") + diff=$(gh pr view $PR_NUMBER --json files --jq '.files[] | select(.path == "sql/updates/latest-dev.sql") | .path') if [[ ${diff} != "" ]]; then updated=1 fi