Skip to content

Commit b99d9c0

Browse files
authored
Match PyTorch _link_check.yml
1 parent ced1d19 commit b99d9c0

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

.github/workflows/_link_check.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,46 @@ jobs:
1212
with:
1313
runner: linux.2xlarge
1414
docker-image: executorch-ubuntu-22.04-linter
15-
submodules: 'none'
15+
submodules: false
1616
fetch-depth: 0
1717
ref: ${{ inputs.ref }}
18-
timeout: 90
18+
timeout: 120
1919
script: |
2020
./scripts/lint_urls.sh $(
2121
{ [ "${{ github.event_name }}" = "pull_request" ] \
2222
&& git diff --name-only "${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }}"; } \
2323
|| \
2424
{ [ "${{ github.event_name }}" = "push" ] \
2525
&& git diff --name-only "${{ github.event.before }}...${{ github.sha }}"; }
26-
)
26+
) || {
27+
echo
28+
echo "URL lint failed."
29+
echo "If this is a transient outage, you can bypass it by adding the \`skip-url-lint\` label to your PR."
30+
echo "Or add \`@lint-ignore\` somewhere on the same line as the URL you want to skip checking."
31+
exit 1
32+
}
2733
2834
lint-xrefs:
2935
if: ${{ github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'skip-xref-lint') }}
3036
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
3137
with:
3238
runner: linux.2xlarge
3339
docker-image: executorch-ubuntu-22.04-linter
34-
submodules: 'none'
40+
submodules: false
3541
fetch-depth: 0
3642
ref: ${{ inputs.ref }}
37-
timeout: 90
43+
timeout: 60
3844
script: |
3945
./scripts/lint_xrefs.sh $(
4046
{ [ "${{ github.event_name }}" = "pull_request" ] \
4147
&& git diff --name-only "${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }}"; } \
4248
|| \
4349
{ [ "${{ github.event_name }}" = "push" ] \
4450
&& git diff --name-only "${{ github.event.before }}...${{ github.sha }}"; }
45-
)
51+
) || {
52+
echo
53+
echo "Xref lint failed."
54+
echo "If this is a transient outage, you can bypass it by adding the \`skip-xref-lint\` label to your PR."
55+
echo "Or add \`@lint-ignore\` somewhere on the same line as the reference you want to skip checking."
56+
exit 1
57+
}

0 commit comments

Comments
 (0)