Skip to content

Commit

Permalink
Add link to workflow run (#1384)
Browse files Browse the repository at this point in the history
* Explicitly set SHA for checks status

* Add link to workflow run in PR comment
  • Loading branch information
stuartleeks authored Feb 26, 2022
1 parent 561b482 commit 18b9e8f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/pr_comment_bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,23 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
# the name must be identical to the one received by the real job
sha: ${{ steps.get_pr_details.outputs.prRef }}
name: "Deploy PR / Run E2E Tests (Smoke)"
status: "completed"
conclusion: "success"

- name: Comment with link to run
if: ${{ steps.check_command.outputs.result == 'run-tests' }}
env:
PR_NUMBER: ${{ github.event.issue.number }}
REPO: ${{ github.event.repository.full_name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUN_ID: ${{ github.run_id }}
run: |
echo "Showing help on PR ${PR_NUMBER}"
gh pr comment ${PR_NUMBER} --repo $REPO --body "Running tests: https://github.com/${REPO}/actions/runs/${RUN_ID}"
run_test:
# Run the tests with the re-usable workflow
needs: [pr_comment]
Expand Down

0 comments on commit 18b9e8f

Please sign in to comment.