diff --git a/.github/workflows/test-backstop.yml b/.github/workflows/test-backstop.yml index d832edb95..6cca18d14 100644 --- a/.github/workflows/test-backstop.yml +++ b/.github/workflows/test-backstop.yml @@ -78,23 +78,22 @@ jobs: echo ERROR_COMMENT_BODY=$FAIL_TABLE >> $GITHUB_OUTPUT - uses: actions/github-script@v6 - if: failure() + if: steps.backstop.outcome != 'success' with: script: | github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: `# 🙈 BackstopJS found some visual changes: - ${{ steps.backstop.outputs.ERROR_COMMENT_BODY }}` + body: # 🙈 BackstopJS found some visual changes: ${{ steps.backstop.outputs.ERROR_COMMENT_BODY }} }) - # - name: continue-on-error Comment - # uses: dgrebb/continue-on-error-comment@feature/change-signature - # with: - # repo-token: ${{ secrets.GH_WORKFLOW_TOKEN }} - # outcome: ${{ steps.backstop.outcome }} - # test-id: ${{ steps.backstop.outputs.ERROR_COMMENT_BODY }} + - name: continue-on-error Comment + uses: dgrebb/continue-on-error-comment@feature/change-signature + with: + repo-token: ${{ secrets.GH_WORKFLOW_TOKEN }} + outcome: ${{ steps.backstop.outcome }} + test-id: `${{ steps.backstop.outputs.ERROR_COMMENT_BODY }}` - name: ⬆ Uploading Test Report if: always()