Skip to content

Commit 50f175f

Browse files
authored
Update build-pr-cmk.yml
1 parent 0568f4a commit 50f175f

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/build-pr-cmk.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,17 @@ jobs:
3939
path: cmk.linux.x86-64.pr${{ github.event.pull_request.number }}
4040
if-no-files-found: error
4141

42+
- name: Comment on PR with artifact link
43+
if: ${{ github.event_name == 'pull_request' }}
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
PR_NUMBER: ${{ github.event.pull_request.number }}
47+
RUN_ID: ${{ github.run_id }}
48+
REPO: ${{ github.repository }}
49+
run: |
50+
COMMENT="✅ Build complete for PR #${PR_NUMBER}%0A🔗 [Download the cmk binary](https://github.com/${REPO}/actions/runs/${RUN_ID})"
51+
curl -s -X POST \
52+
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
53+
-H "Content-Type: application/json" \
54+
-d "{\"body\": \"${COMMENT}\"}" \
55+
"https://api.github.com/repos/${REPO}/issues/${PR_NUMBER}/comments"

0 commit comments

Comments
 (0)