Skip to content

Commit

Permalink
增加镜像扫描,通过评论触发
Browse files Browse the repository at this point in the history
  • Loading branch information
shishupei committed Dec 17, 2024
1 parent 76381d5 commit 6e5d806
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/scan-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
if [[ "$COMMENT_BODY" == "$PREFIX"* ]]; then
# 去掉前缀并提取后面的内容
IMAGE_URL="${COMMENT_BODY#$PREFIX}"
echo ${{ github.event.issue.head.ref }} ${{ github.event.issue.number }} ${{ secrets.CODEARTS_PASSWORD }} ${{ secrets.CODEARTS_SCAN_IMAGE_PIPELINE }} ${{ secrets.CODEARTS_ENDPOINT_ID }} ${{ github.event.repository.html_url }} ${GITHUB_REPOSITORY%/*} ${GITHUB_REPOSITORY##*/} "$IMAGE_URL"
echo main ${{ github.event.issue.number }} ${{ secrets.CODEARTS_PASSWORD }} ${{ secrets.CODEARTS_SCAN_IMAGE_PIPELINE }} ${{ secrets.CODEARTS_ENDPOINT_ID }} https://github.com/${GITHUB_REPOSITORY}.git ${GITHUB_REPOSITORY%/*} ${GITHUB_REPOSITORY##*/} "$IMAGE_URL"
./.github/script/scan_image.sh ${{ github.event.issue.head.ref }} ${{ github.event.issue.number }} ${{ secrets.CODEARTS_PASSWORD }} ${{ secrets.CODEARTS_SCAN_IMAGE_PIPELINE }} ${{ secrets.CODEARTS_ENDPOINT_ID }} ${{ github.event.repository.html_url }} ${GITHUB_REPOSITORY%/*} ${GITHUB_REPOSITORY##*/} "$IMAGE_URL"
./.github/script/scan_image.sh main ${{ github.event.issue.number }} ${{ secrets.CODEARTS_PASSWORD }} ${{ secrets.CODEARTS_SCAN_IMAGE_PIPELINE }} ${{ secrets.CODEARTS_ENDPOINT_ID }} https://github.com/${GITHUB_REPOSITORY}.git ${GITHUB_REPOSITORY%/*} ${GITHUB_REPOSITORY##*/} "$IMAGE_URL"
else
echo "Comment does not match the prefix, skipping the script execution."
fi

0 comments on commit 6e5d806

Please sign in to comment.