-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add explicit checks update for comment-triggered builds
- Loading branch information
1 parent
607abde
commit 2c4b532
Showing
2 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,13 +5,17 @@ on: | |
workflow_call: | ||
inputs: | ||
prRepo: | ||
description: Name of the repo GitHub repo containing the ref (as org/repo ) | ||
description: Name of the repo GitHub repo containing the ref (as org/repo) | ||
type: string | ||
required: false | ||
prRef: | ||
description: The git ref to checkout | ||
type: string | ||
required: false | ||
prHeadSha: | ||
description: For PR builds where GITHUB_REF isn't set to the PR (e.g. comment trigger), pass the PR's head SHA commit here | ||
type: string | ||
required: false | ||
ciGitRef: | ||
description: The git ref to use in annotations to associate a deployment with the code that triggered it | ||
type: string | ||
|
@@ -591,6 +595,20 @@ jobs: | |
TRE_ID: "${{ secrets.TRE_ID }}" | ||
IS_API_SECURED: false | ||
|
||
# For PR builds triggered from comment builds, the GITHUB_REF is set to main | ||
# so the checks aren't automatically associated with the PR | ||
# If prHeadSha is specified then explicity mark the checks for that SHA | ||
- name: Report check status | ||
if: ${{ inputs.prHeadSha }} | ||
uses: LouisBrunner/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
# the name must be identical to the one received by the real job | ||
sha: ${{ inputs.prHeadSha }} | ||
name: "Deploy PR / Run E2E Tests (Smoke)" | ||
status: "completed" | ||
conclusion: "success" | ||
|
||
- name: Notify dedicated teams channel | ||
uses: sachinkundu/[email protected] | ||
if: ${{ failure() && github.ref == 'refs/heads/main'}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters