-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
40 lines (40 loc) · 1.73 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: "CodeQL static application security testing report"
description: "This action leverages GitHub's API to gather and post data related to CodeQL."
inputs:
codeql_github_integration_token:
description: "Expects a string value corresponding to the GitHub repository to post a GitHub Issue to."
required: false
default: '${{ github.token }}'
github_repository:
description: "Expects a string value corresponding to the GitHub repository to post a GitHub Issue to."
required: false
default: '${{ github.repository }}'
github_issue_assignee:
description: "Expects a string value corresponding to the GitHub user to assign issues to."
required: false
runs:
using: "composite"
steps:
- name: Checkout private tools
run: git clone --branch main https://github.com/awshole/git-power.git
shell: pwsh
- name: Create GitHub issue
run: |
if ('${{ github.EVENT_NAME }}' -notlike 'pull_request') {
$branchName = '${{ github.REF }}'.Replace('refs/heads/','')
$splat = @{
dotSourceFileRepository = 'awshole/git-power'
dotSourceFileBranch = 'main'
dotSourceFilePath = 'functions/github-rest-api-functions.ps1'
gitHubToken = '${{ inputs.codeql_github_integration_token }}'
gitHubRepository = '${{ inputs.github_repository }}'
gitHubRepositoryBranchName = $branchName
runId = '${{ github.run_id }}'
labels = @('security', 'code-ql')
}
if ('${{ inputs.github_issue_assignee }}' -notlike '' ) {
$splat.Add('githubIssueAssignee', '${{ inputs.github_issue_assignee }}')
}
git-power/scripts/Set-CodeQLGitHubIssue.ps1 @splat
}
shell: pwsh