Skip to content

Commit

Permalink
try to fix pr
Browse files Browse the repository at this point in the history
  • Loading branch information
mdekstrand committed Jul 2, 2024
1 parent 79044d0 commit f121573
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,19 @@ jobs:
fetch-depth: 0
- id: check-for-changes
run: |
gh pr diff --name-only |grep '^lenskit.*\.py$'
if [ "$?" -eq 0 ]; then
if [[ -z "$PR_NUMBER" ]]; then
echo changed=true >>$GITHUB_OUTPUT
else
echo changed=false >>$GITHUB_OUTPUT
gh pr diff $PR_NUMBER --name-only |grep '^lenskit.*\.py$'
if [ "$?" -eq 0 ]; then
echo changed=true >>$GITHUB_OUTPUT
else
echo changed=false >>$GITHUB_OUTPUT
fi
fi
env:
GH_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ github.event.number }}
conda:
name: Conda Python ${{matrix.python}} on ${{matrix.platform}}
runs-on: ${{matrix.platform}}
Expand Down
15 changes: 11 additions & 4 deletions lkdev/workflows/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,14 +370,21 @@ def job_check_changes() -> GHJob:
{
"id": "check-for-changes",
"run": script("""
gh pr diff --name-only |grep '^lenskit.*\\.py$'
if [ "$?" -eq 0 ]; then
if [[ -z "$PR_NUMBER" ]]; then
echo changed=true >>$GITHUB_OUTPUT
else
echo changed=false >>$GITHUB_OUTPUT
gh pr diff $PR_NUMBER --name-only |grep '^lenskit.*\\.py$'
if [ "$?" -eq 0 ]; then
echo changed=true >>$GITHUB_OUTPUT
else
echo changed=false >>$GITHUB_OUTPUT
fi
fi
"""),
"env": {"GH_TOKEN": "${{ github.token }}"},
"env": {
"GH_TOKEN": "${{ github.token }}",
"PR_NUMBER": "${{ github.event.number }}",
},
},
],
}
Expand Down

0 comments on commit f121573

Please sign in to comment.