Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/update comment #184

Merged
merged 12 commits into from
Aug 15, 2023
16 changes: 16 additions & 0 deletions .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,24 @@ name: Analyze
on: push

jobs:
Check_pr:
runs-on: ubuntu-latest
outputs:
is_pr: ${{ steps.check.outputs.is_pr }}
steps:
- name: Check if PR
id: check
run: |
if [[ "${{ github.event.pull_request }}" != "" ]]; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like github.event.pull_request is empty for this PR, which results in this statement evaluating to False. Maybe test it by checking what is the value stored in github.event.pull_request?

echo "is_pr=true" >> $GITHUB_OUTPUT
else
echo "is_pr=false" >> $GITHUB_OUTPUT
echo "Not a PR, skipping analysis"
fi
Analyze:
runs-on: ${{ matrix.os }}
needs: [Check_pr]
if: needs.Check_pr.outputs.is_pr == 'true'
strategy:
matrix:
python-version: [3.9]
Expand Down
Loading