Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: lycheeverse/lychee-action
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.5.0
Choose a base ref
...
head repository: lycheeverse/lychee-action
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.5.1
Choose a head ref
  • 3 commits
  • 2 files changed
  • 2 contributors

Commits on Jul 7, 2022

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a520e85 View commit details

Commits on Jul 12, 2022

  1. Propagate lychee exit code (#145)

    Ever since we moved to a composite action the exit code for lychee didn't work as expected.
    The reason is that the the output of a step needs to be propagated to an output of the entire
    action by setting an explicit parameter in the `outputs` section.
    See https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#outputs-for-composite-actions
    mre authored Jul 12, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    72460ce View commit details

Commits on Jul 27, 2022

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4a5af7c View commit details
Showing with 27 additions and 21 deletions.
  1. +11 −10 README.md
  2. +16 −11 action.yml
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -79,19 +79,19 @@ jobs:

This action uses [lychee] for link checking.
lychee arguments can be passed to the action via the `args` parameter.
See [lychee's documentation][lychee-args] for all possible arguments.

On top of that, the action also supports some additional arguments.

| Argument | Description |
| ------------- | -------------------------------------------------------------------------------- |
| format | Summary output format (markdown, json,...) |
| output | Summary output file path |
| fail | Fail entire pipeline on error (i.e. when lychee exit code is not 0) |
| jobSummary | Write Github job summary at the end of the job (written on Markdown output only) |
| lycheeVersion | Overwrite the lychee version to be used |
| Argument | Examples | Description |
| ------------- | ----------------------- |-------------------------------------------------------------------------------- |
| args | `--cache`, `--insecure` | See [lychee's documentation][lychee-args] for all arguments and values |
| format | `markdown`, `json` | Summary output format |
| output | `lychee/results.md` | Summary output file path |
| fail | `false` | Fail workflow run on error (i.e. when [lychee exit code][lychee-exit] is not 0) |
| jobSummary | `false` | Write Github job summary (on Markdown output only) |
| lycheeVersion | `0.10.0` | Overwrite the lychee version to be used |

See [action.yml](./action.yml) for a full list of supported arguments.
See [action.yml](./action.yml) for a full list of supported arguments and their default values.

### Example of argument passing

@@ -194,6 +194,7 @@ at your option.

[lychee]: https://github.com/lycheeverse/lychee
[lychee-args]: https://github.com/lycheeverse/lychee#commandline-parameters
[lychee-exit]: https://github.com/lycheeverse/lychee#exit-codes
[troubleshooting]: https://github.com/lycheeverse/lychee/blob/master/docs/TROUBLESHOOTING.md
[security]: https://francoisbest.com/posts/2020/the-security-of-github-actions
[dependabot]: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
[dependabot]: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
27 changes: 16 additions & 11 deletions action.yml
Original file line number Diff line number Diff line change
@@ -2,50 +2,55 @@ name: "Lychee Broken Link Checker"
description: "Quickly check links in Markdown, HTML, and text files"
inputs:
args:
description: "lychee arguments"
description: "Lychee arguments (https://github.com/lycheeverse/lychee#commandline-parameters)"
default: "--verbose --no-progress './**/*.md' './**/*.html'"
required: false
format:
description: "summary output format (e.g. json)"
description: "Summary output format (e.g. json)"
default: "markdown"
required: false
output:
description: "summary output file path"
description: "Summary output file path"
default: "lychee/out.md"
required: false
fail:
description: "fail entire pipeline on error (i.e. when lychee exit code is not 0)"
description: "Fail entire pipeline on error (i.e. when lychee exit code is not 0)"
default: false
required: false
jobSummary:
description: "write Github job summary at the end of the job (written on Markdown output only)"
description: "Write Github job summary at the end of the job (written on Markdown output only)"
default: true
required: false
lycheeVersion:
description: "use custom version of lychee link checker"
default: 0.10.0
description: "Use custom version of lychee link checker"
default: 0.10.1
required: false
outputs:
exit_code:
description: "The exit code returned from Lychee"
value: ${{ steps.lychee.outputs.exit_code }}
runs:
using: "composite"
steps:
- name: install lychee
- name: Install lychee
run: |
curl -LO 'https://github.com/lycheeverse/lychee/releases/download/v${{ inputs.LYCHEEVERSION }}/lychee-v${{ inputs.LYCHEEVERSION }}-x86_64-unknown-linux-gnu.tar.gz'
tar -xvzf lychee-v${{ inputs.LYCHEEVERSION }}-x86_64-unknown-linux-gnu.tar.gz
chmod 755 lychee
mv lychee /usr/local/bin/lychee
shell: bash
- run: ${{ github.action_path }}/entrypoint.sh
- name: Run lychee
run: ${{ github.action_path }}/entrypoint.sh
id: lychee
env:
#https://github.com/actions/runner/issues/665
# https://github.com/actions/runner/issues/665
INPUT_GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
INPUT_ARGS: ${{ inputs.ARGS }}
INPUT_FORMAT: ${{ inputs.FORMAT }}
INPUT_OUTPUT: ${{ inputs.OUTPUT }}
INPUT_FAIL: ${{ inputs.FAIL }}
INPUT_JOBSUMMARY: ${{ inputs.JOBSUMMARY }}
shell: bash

branding:
icon: "external-link"
color: "purple"