Skip to content

Commit

Permalink
Use gh instead
Browse files Browse the repository at this point in the history
  • Loading branch information
konskov committed Sep 25, 2023
1 parent cd94224 commit cfdaf90
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/catalog-updates-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cfdaf90

Please sign in to comment.