-
Couldn't load subscription status.
- Fork 1.2k
.github: check connectivity of external links via GitHub action #4464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
c0fd03a
add check
b7e6efc
add id
80ed7eb
exclude https://github.com/pingcap/tidb/pull/.* links
a549280
Merge remote-tracking branch 'upstream/master' into external-link-check
28abe98
fix indent
d39c3a2
exclude all github pull requests
629c899
test: exclude some github links
b171749
exclude local hosts
1ad96f2
exlude urls with hostname+port pattern
2585f56
exclude googleusercontent site pages
321fe9e
update pdf link
4ce5bfc
exclude static.googleusercontent.com/media/research.google.com/ urls
aa9fb04
Merge branch 'master' into external-link-check
yikeke 0494abd
Merge branch 'master' into external-link-check
yikeke 90a0866
update regex
591a633
fix one link and fix regex
83fd489
Update figma-quick-start-guide.md
5273c8e
test connectivity
660d876
Update figma-quick-start-guide.md
003f981
change concurrency to 24
yikeke ce34a83
Revert "change concurrency to 24"
455faa8
delete two figma links
9be4d36
Update figma-quick-start-guide.md
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| name: external-link-check | ||
|
|
||
| on: [pull_request] | ||
|
|
||
| jobs: | ||
| base: | ||
| runs-on: ubuntu-18.04 | ||
| steps: | ||
| - name: Check out code | ||
| uses: actions/checkout@v2 | ||
|
|
||
| # NOTE: | ||
| # - the check process can be very fast, | ||
| # but if `-c` is too large then `Too Many Requests (HTTP error 429)` may be reported from `https://github.com/*`. | ||
| # - we hardcode `--document-root` to `/github/workspace` in the container now. | ||
| # - we use `http://172.*` as sample addresses in some docs, so we need to exclude them. | ||
| - name: Check external links | ||
| id: lc | ||
| uses: peter-evans/link-checker@v1 | ||
| with: | ||
| args: -c 32 -d /github/workspace -r -x "http://172.*|https://github.com/.*/pull/.*|https://github.com/.*/issues/.*|https://github.com/[^.\n]*$|http://127.0.0.1.*|http://localhost.*|http://.*:.*|https://static.googleusercontent.com/media/research.google.com/.*|.*.md" . | ||
|
|
||
| - name: Fail if there were external link errors | ||
| if: ${{ steps.lc.outputs.exit_code }} | ||
| run: | | ||
| echo "Please check the broken links reported in the previous step \"Check external links\"." | ||
| exit ${{ steps.lc.outputs.exit_code }} | ||
| # Debug via SSH if previous steps failed | ||
| #- name: Set up tmate session | ||
| # if: ${{ failure() }} | ||
| # uses: mxschmitt/action-tmate@v2 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.