Conversation
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
commented
Jul 11, 2022
| - run: ${{ github.action_path }}/entrypoint.sh | ||
| - name: Run lychee | ||
| run: ${{ github.action_path }}/entrypoint.sh | ||
| id: lychee |
Member
Author
There was a problem hiding this comment.
Does this id have to be unique across the entire Github action pipeline? If so, rename to lychee-cli-run to avoid conflicts.
There was a problem hiding this comment.
The composite action docs aren't that helpful at clarifying that. I assume it only needs to be unique within this action.yml scope.
So I doubt that will be a concern. Easy enough to verify after it's merged?
Co-authored-by: Brennan Kinney <[email protected]>
Member
Author
|
Thanks for the review @polarathene. |
kodiakhq bot
referenced
this pull request
in sosiristseng/template-hugo-book
Jul 28, 2022
[](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [lycheeverse/lychee-action](https://togithub.com/lycheeverse/lychee-action) | action | patch | `v1.5.0` -> `v1.5.1` | --- ### Release Notes <details> <summary>lycheeverse/lychee-action</summary> ### [`v1.5.1`](https://togithub.com/lycheeverse/lychee-action/releases/tag/v1.5.1) [Compare Source](https://togithub.com/lycheeverse/lychee-action/compare/v1.5.0...v1.5.1) #### Summary Bump lychee version to fix some regressions and extend the documentation. #### What's Changed - README: Expand argument table by [@​tooomm](https://togithub.com/tooomm) in [https://github.com/lycheeverse/lychee-action/pull/143](https://togithub.com/lycheeverse/lychee-action/pull/143) - Propagate lychee exit code by [@​mre](https://togithub.com/mre) in [https://github.com/lycheeverse/lychee-action/pull/145](https://togithub.com/lycheeverse/lychee-action/pull/145) - Bump lychee version to 0.10.1 by [@​mre](https://togithub.com/mre) in [https://github.com/lycheeverse/lychee-action/pull/150](https://togithub.com/lycheeverse/lychee-action/pull/150) #### New Contributors - [@​tooomm](https://togithub.com/tooomm) made their first contribution in [https://github.com/lycheeverse/lychee-action/pull/143](https://togithub.com/lycheeverse/lychee-action/pull/143) **Full Changelog**: lycheeverse/lychee-action@v1.5.0...v1.5.1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/sosiristseng/template-hugo-book). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xMjcuNCIsInVwZGF0ZWRJblZlciI6IjMyLjEyNy40In0=-->
github-actions bot
referenced
this pull request
in sosiristseng/template-hugo-book
Jul 28, 2022
[](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [lycheeverse/lychee-action](https://togithub.com/lycheeverse/lychee-action) | action | patch | `v1.5.0` -> `v1.5.1` | --- ### Release Notes <details> <summary>lycheeverse/lychee-action</summary> ### [`v1.5.1`](https://togithub.com/lycheeverse/lychee-action/releases/tag/v1.5.1) [Compare Source](https://togithub.com/lycheeverse/lychee-action/compare/v1.5.0...v1.5.1) #### Summary Bump lychee version to fix some regressions and extend the documentation. #### What's Changed - README: Expand argument table by [@​tooomm](https://togithub.com/tooomm) in [https://github.com/lycheeverse/lychee-action/pull/143](https://togithub.com/lycheeverse/lychee-action/pull/143) - Propagate lychee exit code by [@​mre](https://togithub.com/mre) in [https://github.com/lycheeverse/lychee-action/pull/145](https://togithub.com/lycheeverse/lychee-action/pull/145) - Bump lychee version to 0.10.1 by [@​mre](https://togithub.com/mre) in [https://github.com/lycheeverse/lychee-action/pull/150](https://togithub.com/lycheeverse/lychee-action/pull/150) #### New Contributors - [@​tooomm](https://togithub.com/tooomm) made their first contribution in [https://github.com/lycheeverse/lychee-action/pull/143](https://togithub.com/lycheeverse/lychee-action/pull/143) **Full Changelog**: lycheeverse/lychee-action@v1.5.0...v1.5.1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/sosiristseng/template-hugo-book). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xMjcuNCIsInVwZGF0ZWRJblZlciI6IjMyLjEyNy40In0=-->
YDX-2147483647
added a commit
to YDX-2147483647/lychee-action
that referenced
this pull request
Nov 5, 2024
This commit also makes sure `outputs.exit_code` is “The exit code returned from Lychee”. `failIfEmpty` no longer changes it to `1`. Relevant docs: - [Setting exit codes for actions - GitHub Docs](https://docs.github.com/en/actions/sharing-automations/creating-actions/setting-exit-codes-for-actions) - [exit - POSIX Programmer's Manual](https://manned.org/exit.1posix) Relates to lycheeverse#86, lycheeverse#128, lycheeverse#145, lycheeverse#245, and lycheeverse#251.
This was referenced Nov 5, 2024
YDX-2147483647
added a commit
to YDX-2147483647/lychee-action
that referenced
this pull request
Nov 5, 2024
This commit also makes sure `outputs.exit_code` is “The exit code returned from Lychee”. `failIfEmpty` no longer changes it to `1`. Relevant docs: - [Setting exit codes for actions - GitHub Docs](https://docs.github.com/en/actions/sharing-automations/creating-actions/setting-exit-codes-for-actions) - [exit - POSIX Programmer's Manual](https://manned.org/exit.1posix) Relates to lycheeverse#86, lycheeverse#128, lycheeverse#145, lycheeverse#245, and lycheeverse#251.
YDX-2147483647
added a commit
to YDX-2147483647/lychee-action
that referenced
this pull request
Nov 5, 2024
This commit also makes sure `outputs.exit_code` is “The exit code returned from Lychee”. `failIfEmpty` no longer changes it to `1`. Relevant docs: - [Setting exit codes for actions - GitHub Docs](https://docs.github.com/en/actions/sharing-automations/creating-actions/setting-exit-codes-for-actions) - [exit - POSIX Programmer's Manual](https://manned.org/exit.1posix) Relates to lycheeverse#86, lycheeverse#128, lycheeverse#145, lycheeverse#245, and lycheeverse#251.
YDX-2147483647
added a commit
to YDX-2147483647/lychee-action
that referenced
this pull request
Nov 5, 2024
This commit also makes sure `outputs.exit_code` is “The exit code returned from Lychee”. `failIfEmpty` no longer changes it to `1`. Relevant docs: - [Setting exit codes for actions - GitHub Docs](https://docs.github.com/en/actions/sharing-automations/creating-actions/setting-exit-codes-for-actions) - [exit - POSIX Programmer's Manual](https://manned.org/exit.1posix) Relates to lycheeverse#86, lycheeverse#128, lycheeverse#145, lycheeverse#245, and lycheeverse#251.
mre
pushed a commit
that referenced
this pull request
Nov 7, 2024
- **fix: Make `fail: false` effective even when `failIfEmpty: true`** This commit also makes sure `outputs.exit_code` is “The exit code returned from Lychee”. `failIfEmpty` no longer changes it to `1`. Relevant docs: - [Setting exit codes for actions - GitHub Docs](https://docs.github.com/en/actions/sharing-automations/creating-actions/setting-exit-codes-for-actions) - [exit - POSIX Programmer's Manual](https://manned.org/exit.1posix) Relates to #86, #128, #145, #245, and #251. - **fix: Update `env.exit_code` to `outputs.exit_code`** The previous expression always gives `false`. Both `env.exit_code` and `env.lychee_exit_code` are `null`, probably since the docker→composite refactor #128. When GitHub evaluates the expression, it finds the types do not match, and coerces them to number, namely, `null` → `0`. See [Evaluate expressions in workflows and actions - GitHub Docs](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#operators). Relates to #253. Co-authored-by: Sebastiaan Speck <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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
outputssection.See https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#outputs-for-composite-actions