|
18 | 18 | runs-on: [self-hosted, linux, x64, dev, dmount] |
19 | 19 | name: PR-Comment-Integration-Tests |
20 | 20 | steps: |
| 21 | + - name: Post workflow run link in PR |
| 22 | + uses: actions/github-script@v7 |
| 23 | + with: |
| 24 | + script: | |
| 25 | + const prUrl = context.payload.issue.pull_request.url; |
| 26 | + const runUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${process.env.GITHUB_RUN_ID}`; |
| 27 | + await github.rest.issues.createComment({ |
| 28 | + issue_number: context.issue.number, |
| 29 | + owner: context.repo.owner, |
| 30 | + repo: context.repo.repo, |
| 31 | + body: `🚀 Workflow run started: [View run](${runUrl})` |
| 32 | + }); |
| 33 | +
|
21 | 34 | - name: Checkout repository |
22 | 35 | uses: actions/checkout@v4 |
23 | 36 |
|
|
53 | 66 |
|
54 | 67 | echo "✅ Running integration test for: $TASK_NAME" |
55 | 68 | tox -vv -e "integration-test-${TASK_NAME}" |
| 69 | +
|
| 70 | + - name: Post result to PR |
| 71 | + uses: actions/github-script@v7 |
| 72 | + with: |
| 73 | + script: | |
| 74 | + const conclusion = "${{ job.status }}"; |
| 75 | + const message = conclusion === "success" |
| 76 | + ? "✅ Workflow succeeded!" |
| 77 | + : conclusion === "failure" |
| 78 | + ? "❌ Workflow failed." |
| 79 | + : "⚠️ Workflow finished with status: " + conclusion; |
| 80 | + await github.rest.issues.createComment({ |
| 81 | + issue_number: context.issue.number, |
| 82 | + owner: context.repo.owner, |
| 83 | + repo: context.repo.repo, |
| 84 | + body: message |
| 85 | + }); |
0 commit comments