Skip to content

Commit

Permalink
Use fork to ignore certain IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
cameron-dunn-sublime committed Dec 27, 2023
1 parent f22a9b9 commit 4704246
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/rule-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,24 @@ jobs:
// MQL Mimic will handle duplicates gracefully, no need to handle here.
return allEMLsToSkip.join(" ")
- name: "Find Existing MQL Mimic Test Results"
uses: actions/github-script@v6
id: find_mql_mimic_results
with:
debug: ${{ secrets.ACTIONS_STEP_DEBUG || false }}
env:
sha: '${{ steps.get_head.outputs.HEAD }}'
script: |
const result = await client.rest.checks.listForRef({
check_name: "MQL Mimic Tests",
owner: "sublime-security",
repo: "sublime-rules"
ref: process.env.sha
})
let existingRuns = result.data.check_runs.map((r) => r.id)
console.log(existingRuns)
return existingRuns
- name: "Trigger MQL Mimic Tests"
env:
Expand All @@ -314,12 +332,12 @@ jobs:
-d "$body"
- name: Wait for MQL Mimic check to be completed
uses: fountainhead/[email protected]
id: wait-for-build
uses: sublime-security/[email protected]
# Wait for results so that the token remains valid while the test suite is executing and posting a check here.
with:
token: ${{ secrets.GITHUB_TOKEN }}
checkName: "MQL Mimic Tests"
ref: ${{ steps.get_head.outputs.HEAD }}
timeoutSeconds: 3600
ignoreIDs: ${{ steps.find_mql_mimic_results.outputs.result }}

0 comments on commit 4704246

Please sign in to comment.