Skip to content

Commit

Permalink
fix: [SRE-826] add correct parenthesize syntax (#4)
Browse files Browse the repository at this point in the history
fixes missing expression syntax
  • Loading branch information
willstord authored Jun 20, 2024
1 parent c084561 commit 1428772
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ inputs:
github-token:
description: "GitHub token for authentication."
type: string
default: ""
required: false
slack-bot-token:
description: "Slackbot token for sending notifications."
type: string
default: ""
required: false

outputs:
Expand Down Expand Up @@ -71,7 +69,7 @@ runs:

- name: Upload Trivy Report as PR Comment and parse Critical vulnerabilities
id: trivy_report_notification
if: steps.trivy_scan.outcome == 'failure' && inputs.github-token != ''
if: ${{ steps.trivy_scan.outcome == 'failure' && inputs.github-token }}
uses: actions/github-script@v7
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
Expand Down Expand Up @@ -184,7 +182,7 @@ runs:
}
- name: Notify Slack of critical vulnerabilities
if: ${{ steps.trivy_report_notification.outputs.critical_vulnerabilities_count }} != '0' && github.ref == 'refs/heads/main' && inputs.slack-bot-token != ''
if: ${{ steps.trivy_report_notification.outputs.critical_vulnerabilities_count != '0' && github.ref == 'refs/heads/main' && inputs.slack-bot-token }}
uses: slackapi/[email protected]
env:
SLACK_BOT_TOKEN: ${{ inputs.slack-bot-token }}
Expand Down

0 comments on commit 1428772

Please sign in to comment.