Skip to content

Commit 4217f2f

Browse files
committed
Bug fixes
- Temporary fix for #13 until phoenix-actions/test-reporting#31 is merged - Fixed if-condition of "Update PR status comment on failure" (#14) - Fixed variable name in Cancel Workflow (#15) - Fixed default for comment-message-failure (#16)
1 parent f23520f commit 4217f2f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

action.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ inputs:
6565
- {4} is the URL to the HTML-Report
6666
default: |
6767
<details>
68-
<summary><h3>😔 ${0} failed</h3></summary>
68+
<summary><h3>😔 {0} failed</h3></summary>
6969
7070
| Passed | Failed | Skipped |
7171
|--------|--------|---------|
@@ -232,7 +232,7 @@ runs:
232232

233233
- name: Update PR status comment on success
234234
uses: marocchino/sticky-pull-request-comment@v2
235-
if: ${{ github.event_name == 'pull_request' && inputs.comment-enabled == 'true' && inputs.recreate-comment != 'true' && success() }}
235+
if: ${{ steps.generate-report.conclusion == 'success' && github.event_name == 'pull_request' && inputs.comment-enabled == 'true' && inputs.recreate-comment != 'true' }}
236236
with:
237237
append: true
238238
header: ${{ inputs.comment-header }}
@@ -241,15 +241,15 @@ runs:
241241

242242
- name: Update PR status comment on failure
243243
uses: marocchino/sticky-pull-request-comment@v2
244-
if: ${{ github.event_name == 'pull_request' && inputs.comment-enabled == 'true' && inputs.recreate-comment != 'true' && failure() }}
244+
if: ${{ (failure() || steps.generate-report.conclusion != 'success') && github.event_name == 'pull_request' && inputs.comment-enabled == 'true' && inputs.recreate-comment != 'true' }}
245245
with:
246246
append: true
247247
header: ${{ inputs.comment-header }}
248248
message: ${{ format(inputs.comment-message-failure, inputs.report-name, steps.generate-report.outputs.passed, steps.generate-report.outputs.failed, steps.generate-report.outputs.skipped, steps.generate-report.outputs.runHtmlUrl) }}
249249
GITHUB_TOKEN: ${{ github.token }}
250250

251251
- name: Cancel Workflow
252-
if: ${{ failure() && inputs.cancel-workflow-on-error == 'true' }}
252+
if: ${{ (failure() || steps.generate-report.conclusion != 'success') && inputs.cancel-workflow-on-error == 'true' }}
253253
uses: andymckay/[email protected]
254254

255255
branding:

0 commit comments

Comments
 (0)