Skip to content

Commit

Permalink
skip: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
DnPlas committed Sep 26, 2024
1 parent 1d76f69 commit e764722
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/get-images-scan-and-upload-report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,11 @@ jobs:
name: ${{ needs.scan-images.outputs.release-track }}-${{ needs.scan-images.outputs.report-path }}
path: /tmp/

- name: Generate issue body
id: issue-body
run: |
ls /tmp/
cat /tmp/${{ needs.scan-images.outputs.report-path }}
ISSUE_BODY=$(cat /tmp/${{ needs.scan-images.outputs.report-path }})
echo "issue-body=$ISSUE_BODY" >> $GITHUB_OUTPUT
- name: Create/edit issue for vulnerability reports
uses: ./.github/workflows/report-vulnerability-in-gh.yaml
with:
issue-title: "Vulnerabilities found for ${{ needs.scan-images.outputs.image-name }}"
issue-body: "${{ steps.issue-body.outputs.issue-body }}"
issue-body-file: "/tmp/${{ needs.scan-images.outputs.report-path }}"

# - name: Get issue number if exists
# id: get-issue-number
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/report-vulnerability-in-gh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
description: The title of the issue to be created/edited
required: true
type: string
issue-body:
issue-body-file:
description: The body of the issue to be created/edited
required: true
type: string
Expand Down Expand Up @@ -37,7 +37,7 @@ jobs:
echo "## ${{ inputs.issue-title }}" > issue.md
echo "" >> issue.md
echo "\`\`\`" >> issue.md
cat ${{ inputs.issue-body }} >> issue.md
cat ${{ inputs.issue-body-file }} >> issue.md
echo "\`\`\`" >> issue.md
echo "" >> issue.md
echo -e "\nDetails: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> issue.md
Expand Down

0 comments on commit e764722

Please sign in to comment.