5317d6fa68
* fix(zap_scan): check out ref associated with run * fix(zap_scan): use actions/github-script for labeling issues
28 lines
799 B
YAML
28 lines
799 B
YAML
name: Label Security Report
|
|
|
|
on:
|
|
issues:
|
|
types:
|
|
- opened
|
|
|
|
jobs:
|
|
label-security-report:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check if issue title starts with "Security Report -"
|
|
id: check_title
|
|
run: echo "::set-output name=startsWithSecurityReport::$(echo ${{ github.event.issue.title }} | grep -q '^Security Report -' && echo true || echo false)"
|
|
|
|
- name: Add labels
|
|
if: steps.check_title.outputs.startsWithSecurityReport == 'true'
|
|
uses: actions/github-script@v6
|
|
with:
|
|
script: |
|
|
github.rest.issues.addLabels({
|
|
issue_number: context.issue.number,
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
labels: ["security", "reports"]
|
|
})
|