Create IPEntity_Workday.yaml #2595
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: run script on changing detections | |
on: | |
pull_request: | |
paths: | |
- 'Detection**' | |
- 'Solutions/**/Analytic Rules/**' | |
jobs: | |
checkCommentAlreadyExist: | |
runs-on: ubuntu-latest | |
if: ${{ !github.event.pull_request.head.repo.fork }} | |
outputs: | |
hasAutoDetectionComment: ${{ steps.job1.outputs.hasAutoDetectionComment }} | |
steps: | |
- name: Find Comment | |
uses: peter-evans/find-comment@v3 | |
id: fc | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body-includes: Hello how are you I am GitHub bot | |
- id: job1 | |
shell: pwsh | |
run: | | |
$commentId = ${{ steps.fc.outputs.comment-id }} | |
if ($commentId) { | |
Write-Output "hasAutoDetectionComment=$true" >> $env:GITHUB_OUTPUT | |
Write-Host "Comment Already Present!" | |
} else { | |
Write-Output "hasAutoDetectionComment=$false" >> $env:GITHUB_OUTPUT | |
Write-Host "Comment Not Present!" | |
} | |
add-comment: | |
needs: checkCommentAlreadyExist | |
if: ${{ success() && needs.checkCommentAlreadyExist.outputs.hasAutoDetectionComment == 'False' }} | |
uses: ./.github/workflows/addComment.yaml | |
with: | |
message: | | |
**Hello how are you I am GitHub bot** | |
😀😀 | |
I see that you changed templates under the detections/analytic rules folder. Did you remember to update the version of the templates you changed? | |
If not, and if you want customers to be aware that a new version of this template is available, please update the ``version`` property of the template you changed. | |
prNumber: "${{ github.event.pull_request.number }}" | |
secrets: inherit |