Skip to content

Commit

Permalink
fix: boolean conditioning
Browse files Browse the repository at this point in the history
  • Loading branch information
zhijie-yang committed Nov 22, 2024
1 parent c053111 commit 31e315c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/Vulnerability-Scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,13 @@ jobs:
fi
- name: Write to summary
if: ${{ inputs.is-from-release != 'true' && steps.create-markdown.outputs.vulnerability-exists == 'true' }}
if: ${{ inputs.is-from-release && steps.create-markdown.outputs.vulnerability-exists == 'true' }}
run: |
echo "# Vulnerabilities found for ${{ inputs.oci-image-name }}" >> $GITHUB_STEP_SUMMARY
cat ${{ steps.create-markdown.outputs.issue-body-file }} | tail -n +2 >> $GITHUB_STEP_SUMMARY
- id: issue-exists
if: ${{ inputs.is-from-release == 'true' }}
if: ${{ inputs.is-from-release }}
run: |
issue_number=$(gh issue list --repo ${{ steps.get-image-repo.outputs.img-repo }} --json "number,title" \
| jq -r '.[] | select(.title == "${{ steps.create-markdown.outputs.issue-title }}") | .number')
Expand All @@ -282,7 +282,7 @@ jobs:
# | F | F | F | nop |

- name: Notify via GitHub issue
if: ${{ steps.create-markdown.outputs.vulnerability-exists == 'true' && inputs.is-from-release == 'true' }}
if: ${{ steps.create-markdown.outputs.vulnerability-exists == 'true' && inputs.is-from-release }}
run: |
set -x
op=nop
Expand All @@ -299,6 +299,6 @@ jobs:
fi
- name: Close issue
if: ${{ needs.test-vulnerabilities.result == 'success' && steps.issue-exists.outputs.issue-exists == 'true' && steps.create-markdown.outputs.vulnerability-exists == 'false' && inputs.is-from-release == 'true'}}
if: ${{ needs.test-vulnerabilities.result == 'success' && steps.issue-exists.outputs.issue-exists == 'true' && steps.create-markdown.outputs.vulnerability-exists == 'false' && inputs.is-from-release }}
run: |
gh issue close ${{ steps.issue-exists.outputs.issue-number }} --repo ${{ steps.get-image-repo.outputs.img-repo }}

0 comments on commit 31e315c

Please sign in to comment.