Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 0603e0f

Browse files
committed
Fix syntax error – add braces, double-quote
If an if statement does not have operators in the expression, the GitHub Action syntax allows you to omit the expression braces, but that's no longer the case here. Further, the GitHub Action YAML parser will trip up on the colon in the sigle-quoted error message we are looking for, unless we put the entire GitHub Action expression in double-quotes [1]. [1] actions/runner#1019 (comment)
1 parent 4a97464 commit 0603e0f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/pa11y.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,12 @@ jobs:
4444
4545
</details>'
4646

47+
# A defect in pa11y is causing intermitent page crashes [1]. Until it is
48+
# fixed, if a page crashes during a scan, do not mark the pa11y scan as
49+
# failed.
50+
# [1] https://github.com/pa11y/pa11y-ci/issues/128
4751
- name: Check for pa11y failures.
48-
if: contains(steps.pa11y_output.outputs.content, 'errno 2') && !contains(steps.pa11y_output.outputs.content, 'UnhandledPromiseRejectionWarning: Error: Page crashed!')
52+
if: "${{ contains(steps.pa11y_output.outputs.content, 'errno 2') && !contains(steps.pa11y_output.outputs.content, 'UnhandledPromiseRejectionWarning: Error: Page crashed!') }}"
4953
run: |
5054
echo "::error::The site is failing accessibility tests. Please review the comment in the pull request or the pa11y-ci step in the workflow for details."
5155
exit 1

0 commit comments

Comments
 (0)