Skip to content

Commit 769af09

Browse files
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 lycheeverse#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 lycheeverse#253.
1 parent 6dce49b commit 769af09

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/links.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
- uses: actions/checkout@v4
1616

1717
- name: Link Checker
18+
id: lychee
1819
uses: ./ # Uses an action in the root directory
1920
with:
2021
args: --user-agent "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0" --verbose --exclude spinroot.com --no-progress './**/*.md' './**/*.html' './**/*.rst'
@@ -23,7 +24,7 @@ jobs:
2324
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
2425

2526
- name: Create Issue From File
26-
if: env.exit_code != 0
27+
if: ${{ steps.lychee.outputs.exit_code }} != 0
2728
uses: peter-evans/create-issue-from-file@v5
2829
with:
2930
title: Link Checker Report

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
uses: lycheeverse/lychee-action@v2
3838

3939
- name: Create Issue From File
40-
if: env.exit_code != 0
40+
if: ${{ steps.lychee.outputs.exit_code }} != 0
4141
uses: peter-evans/create-issue-from-file@v5
4242
with:
4343
title: Link Checker Report

0 commit comments

Comments
 (0)