diff --git a/.github/workflows/image-mirror.yml b/.github/workflows/image-mirror.yml index 36e4f55..f6a7eda 100644 --- a/.github/workflows/image-mirror.yml +++ b/.github/workflows/image-mirror.yml @@ -40,16 +40,16 @@ jobs: - name: Add comment if body is not image format if: steps.check_body.outputs.is_image_format == 'false' - uses: actions/github-script@v6 + uses: peter-evans/create-or-update-comment@v2 with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - github.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - body: `@${{ github.event.issue.user.login }} 请使用标准镜像格式\n镜像要带tag,如nginx,请写为nginx:latest; \n标题不重要,issue描述部分,每行一个镜像不要有其他内容\n 可以直接更新你的issue` - }) + issue-number: ${{ github.event.issue.number }} + body: | + @${{ github.event.issue.user.login }} + !!!请使用标准镜像格式 + 1. 镜像要带tag,如nginx,请写为nginx:latest + 2. 标题不重要,issue描述部分,每行一个镜像不要有其他内容,你可以直接更新你的issue + reactions: hooray + edit-mode: replace - name: Add image-mirror label if body is image format if: steps.check_body.outputs.is_image_format == 'true'