Skip to content

Fix always-truthy if expression in _detect_changes.yml#242

Open
pdelsante wants to merge 1 commit into
developfrom
fix/detect-changes-if-expression-develop
Open

Fix always-truthy if expression in _detect_changes.yml#242
pdelsante wants to merge 1 commit into
developfrom
fix/detect-changes-if-expression-develop

Conversation

@pdelsante

Copy link
Copy Markdown
Member

Summary

  • The Generate summary step in _detect_changes.yml combined three separate ${{ }} expressions with literal | characters outside the replacement tokens, which GitHub Actions treats as literal text — making the condition always evaluate to truthy regardless of input values (surfaced as a workflow syntax warning when consumed downstream, e.g. certego/certego-tools#328).
  • Combined the three checks into a single ${{ }} expression using the || operator.
  • Applied the same fix to both copies of the file (workflows/_detect_changes.yml and .github/workflows/_detect_changes.yml).

Test plan

  • CI run on this PR should show no more "Conditional expression contains literal text outside replacement tokens" warning
  • Verify the Generate summary step still runs when any of backend_directories/frontend_directories/infrastructure_directories is non-empty, and is skipped when all are empty

🤖 Generated with Claude Code

The "Generate summary" step's if condition combined three separate
${{ }} expressions with literal | characters, which GitHub Actions
treats as literal text outside the replacement tokens - making the
whole condition always evaluate to truthy regardless of input values.
Combine into a single expression using the || operator instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant