Skip to content

Fix if expressions in GitHub actions #265

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 1 commit into from
Nov 8, 2024
Merged

Conversation

YDX-2147483647
Copy link
Contributor

@YDX-2147483647 YDX-2147483647 commented Nov 8, 2024

${{ steps.lychee.outputs.exit_code }} != 0 evaluates to "x != 0" (a string), and always becomes true when GitHub coerces its type.

Relates-to: #262 (comment)

Closes #264

`${{ steps.lychee.outputs.exit_code }} != 0` evaluates to `"0 != 0"` (a string), and becomes `true` when GitHub coerces its type.

Relates-to: lycheeverse#262
@mre mre merged commit 5cd5ba7 into lycheeverse:master Nov 8, 2024
3 checks passed
@mre
Copy link
Member

mre commented Nov 8, 2024

Wow, that's a crazy default on Github's side -- or rather a YAML quirk? Anyhow, glad you figured it out.

@mre mre mentioned this pull request Nov 8, 2024
@YDX-2147483647 YDX-2147483647 deleted the if branch November 9, 2024 06:42
dscho added a commit to dscho/git-scm.com that referenced this pull request Feb 26, 2025
There is specific code in git-scm.com's deploy workflow to open a ticket
whenever broken links were detected, and to close such a ticket when no
broken links were detected.

However, as per lycheeverse/lychee-action#265
the way we checked for this was incorrect: `env.lychee_exit_code` had
was correct, until lycheeverse/lychee-action#245
broke it by way of fixing another bug.

This was the reason why the broken link that was found and reported in
https://github.com/git/git-scm.com/actions/runs/13544529063/job/37852881418#step:3:135319
never made it into a GitHub issue, even if that had been the intention.

For the record, I worked on a fix for this broken link and opened
jnavila/git-manpages-l10n#131 to incorporate
that fix.

What prevented this broken link from being detected before
above-mentioned deployment is the fact that before
git#1953 was merged, the
`git-scm.com` deployment used `http://` in the base URL, and hence the
`--remap` option used in the deployment workflow mapped all
http://git-scm.com links to local files, whereas now the `https://` base
URL is used and https://git-scm.com links are mapped, including the
offending one.

In any case let's fix opening/closing the "broken link" issues.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit to dscho/git-scm.com that referenced this pull request Feb 26, 2025
There is specific code in git-scm.com's deploy workflow to open a ticket
whenever broken links were detected, and to close such a ticket when no
broken links were detected.

However, as per lycheeverse/lychee-action#265
the way we checked for this was incorrect: `env.lychee_exit_code` had
was correct, until lycheeverse/lychee-action#245
broke it by way of fixing another bug.

This was the reason why the broken link that was found and reported in
https://github.com/git/git-scm.com/actions/runs/13544529063/job/37852881418#step:3:135319
never made it into a GitHub issue, even if that had been the intention.

For the record, I worked on a fix for this broken link and opened
jnavila/git-manpages-l10n#131 to incorporate
that fix.

What prevented this broken link from being detected before
above-mentioned deployment is the fact that before
git#1953 was merged, the
`git-scm.com` deployment used `http://` in the base URL, and hence the
`--remap` option used in the deployment workflow mapped all
http://git-scm.com links to local files, whereas now the `https://` base
URL is used and https://git-scm.com links are mapped, including the
offending one.

In any case let's fix opening/closing the "broken link" issues.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
seisman added a commit to GenericMappingTools/pygmt that referenced this pull request Apr 14, 2025
seisman added a commit to GenericMappingTools/pygmt that referenced this pull request Apr 14, 2025
seisman added a commit to GenericMappingTools/pygmt that referenced this pull request Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Link Checker Report
2 participants