mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2024-11-22 07:10:09 +01:00
Update main.yml
This commit is contained in:
parent
99db8c7335
commit
deed7e0022
27
.github/workflows/main.yml
vendored
27
.github/workflows/main.yml
vendored
@ -44,20 +44,13 @@ jobs:
|
|||||||
cat scout-results.txt # Print the report to the workflow logs for easy viewing
|
cat scout-results.txt # Print the report to the workflow logs for easy viewing
|
||||||
echo "Docker Scout analysis completed."
|
echo "Docker Scout analysis completed."
|
||||||
|
|
||||||
- name: Create GitHub issue comment
|
- name: Post Comment on Issue or PR
|
||||||
uses: peter-evans/create-issue-comment@v3
|
run: |
|
||||||
with:
|
COMMENT="**Docker Image Build and Analysis Report**\n\nThe Docker image was built and analyzed successfully.\n\n**Build Summary:**\n- Image Tag: my-app-image:latest\n\n**Analysis Report:**\n\`\`\`\n$(cat scout-results.txt)\n\`\`\`"
|
||||||
issue-number: 1 # Replace with the issue number or use an appropriate method to identify the issue or PR
|
|
||||||
body: |
|
# Post comment using GitHub API
|
||||||
**Docker Image Build and Analysis Report**
|
curl -X POST \
|
||||||
|
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
||||||
The Docker image was built and analyzed successfully.
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
|
-d "{\"body\": \"$COMMENT\"}" \
|
||||||
**Build Summary:**
|
"https://api.github.com/repos/${{ github.repository }}/issues/1/comments" # Replace '1' with the issue or PR number
|
||||||
- Image Tag: my-app-image:latest
|
|
||||||
|
|
||||||
**Analysis Report:**
|
|
||||||
```
|
|
||||||
$(cat scout-results.txt)
|
|
||||||
```
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user