Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
- 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)
  • Loading branch information
turing85 committed Feb 28, 2023
1 parent f23520f commit 4217f2f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ inputs:
- {4} is the URL to the HTML-Report
default: |
<details>
<summary><h3>😔 ${0} failed</h3></summary>
<summary><h3>😔 {0} failed</h3></summary>
| Passed | Failed | Skipped |
|--------|--------|---------|
Expand Down Expand Up @@ -232,7 +232,7 @@ runs:

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

- name: Update PR status comment on failure
uses: marocchino/sticky-pull-request-comment@v2
if: ${{ github.event_name == 'pull_request' && inputs.comment-enabled == 'true' && inputs.recreate-comment != 'true' && failure() }}
if: ${{ (failure() || steps.generate-report.conclusion != 'success') && github.event_name == 'pull_request' && inputs.comment-enabled == 'true' && inputs.recreate-comment != 'true' }}
with:
append: true
header: ${{ inputs.comment-header }}
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) }}
GITHUB_TOKEN: ${{ github.token }}

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

branding:
Expand Down

0 comments on commit 4217f2f

Please sign in to comment.