forked from open-telemetry/opentelemetry-java-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
Make it easier to run lychee locally #18
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
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
|
|
||
| export MSYS_NO_PATHCONV=1 # for Git Bash on Windows | ||
|
|
||
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
| LYCHEE_CONFIG="$SCRIPT_DIR/../../lychee.toml" | ||
| DEPENDENCIES_DOCKERFILE="$SCRIPT_DIR/dependencies.dockerfile" | ||
|
|
||
| # Extract lychee version from dependencies.dockerfile | ||
| LYCHEE_VERSION=$(grep "FROM lycheeverse/lychee:" "$DEPENDENCIES_DOCKERFILE" | sed 's/.*FROM lycheeverse\/lychee:\([^ ]*\).*/\1/') | ||
|
|
||
| # Build the lychee command with optional GitHub token | ||
| CMD="lycheeverse/lychee:$LYCHEE_VERSION --verbose --config ./lychee.toml" | ||
|
|
||
| # Add GitHub token if available | ||
| if [[ -n "$GITHUB_TOKEN" ]]; then | ||
| CMD="$CMD --github-token $GITHUB_TOKEN" | ||
| fi | ||
|
|
||
| # Add the target directory | ||
| CMD="$CMD ." | ||
|
|
||
| # Determine if we should allocate a TTY | ||
| DOCKER_FLAGS="--rm --init" | ||
| if [[ -t 0 ]]; then | ||
| DOCKER_FLAGS="$DOCKER_FLAGS -it" | ||
| else | ||
| DOCKER_FLAGS="$DOCKER_FLAGS -i" | ||
| fi | ||
|
|
||
| # Run lychee with proper signal handling | ||
| # shellcheck disable=SC2086 | ||
| exec docker run $DOCKER_FLAGS -v "$(dirname "$LYCHEE_CONFIG")":/data -w /data $CMD |
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,3 @@ | ||
| # this file exists so that Renovate can auto-update docker image versions that are then used elsewhere | ||
|
|
||
| FROM lycheeverse/lychee:sha-2aa22f8@sha256:2e3786630482c41f9f2dd081e06d7da1c36d66996e8cf6573409b8bc418d48c4 AS lychee |
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,18 @@ | ||
| name: Reusable - Check links | ||
|
|
||
| on: | ||
| workflow_call: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| check-links: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
|
||
| - name: Check links | ||
| env: | ||
| GITHUB_TOKEN: ${{ github.token }} | ||
| run: ./.github/scripts/check-links.sh |
This file was deleted.
Oops, something went wrong.
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,10 @@ | ||
| max_retries = 6 | ||
| max_concurrency = 1 | ||
|
|
||
| # Check fragments in links | ||
| include_fragments = true | ||
|
|
||
| # excluding links to pull requests and issues is done for performance | ||
| exclude = [ | ||
| '^https://github.com/open-telemetry/opentelemetry-java-contrib/(issues|pull)/\d+$', | ||
| ] | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you include this comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right - I included an extra comment that wasn't in the original GitHub workflow. The original workflow only had the comment about excluding links for performance reasons. I've removed the unnecessary comment in 5b58f1a.