set FAIL_ON_FLAW to fail link checking (#49444)
This commit is contained in:
2
.github/workflows/link-check-daily.yml
vendored
2
.github/workflows/link-check-daily.yml
vendored
@@ -75,10 +75,12 @@ jobs:
|
|||||||
# If we're unable to connect or the server returns a 50x error,
|
# If we're unable to connect or the server returns a 50x error,
|
||||||
# treat it as a warning and not as a broken link.
|
# treat it as a warning and not as a broken link.
|
||||||
EXTERNAL_SERVER_ERRORS_AS_WARNINGS: true
|
EXTERNAL_SERVER_ERRORS_AS_WARNINGS: true
|
||||||
|
FAIL_ON_FLAW: false
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
run: node src/links/scripts/rendered-content-link-checker.js
|
run: node src/links/scripts/rendered-content-link-checker.js
|
||||||
|
|
||||||
- name: Upload artifact(s)
|
- name: Upload artifact(s)
|
||||||
|
if: ${{ always() }}
|
||||||
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
|
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
|
||||||
with:
|
with:
|
||||||
name: artifacts
|
name: artifacts
|
||||||
|
|||||||
1
.github/workflows/link-check-on-pr.yml
vendored
1
.github/workflows/link-check-on-pr.yml
vendored
@@ -48,6 +48,7 @@ jobs:
|
|||||||
# we're filtering on anyway once the list of all pages has
|
# we're filtering on anyway once the list of all pages has
|
||||||
# been loaded.
|
# been loaded.
|
||||||
ENABLED_LANGUAGES: en
|
ENABLED_LANGUAGES: en
|
||||||
|
FAIL_ON_FLAW: true
|
||||||
run: node src/links/scripts/rendered-content-link-checker.js
|
run: node src/links/scripts/rendered-content-link-checker.js
|
||||||
|
|
||||||
- name: Upload artifact(s)
|
- name: Upload artifact(s)
|
||||||
|
|||||||
@@ -330,9 +330,9 @@ async function main(core, octokit, uploadArtifact, opts = {}) {
|
|||||||
core.setFailed(
|
core.setFailed(
|
||||||
`${flaws.length} broken links found. See action artifact uploads for details`,
|
`${flaws.length} broken links found. See action artifact uploads for details`,
|
||||||
)
|
)
|
||||||
|
process.exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
process.exit(1)
|
|
||||||
} else {
|
} else {
|
||||||
// It might be that the PR got a comment about >0 flaws before,
|
// It might be that the PR got a comment about >0 flaws before,
|
||||||
// and now it can update that comment to say all is well again.
|
// and now it can update that comment to say all is well again.
|
||||||
|
|||||||
Reference in New Issue
Block a user