Skip to content

ci: fix invalid workflow file (literal ${{ }} in run: comment)#23

Merged
swstegall merged 1 commit into
developfrom
fix/discord-notify-workflow-expression
May 31, 2026
Merged

ci: fix invalid workflow file (literal ${{ }} in run: comment)#23
swstegall merged 1 commit into
developfrom
fix/discord-notify-workflow-expression

Conversation

@swstegall

Copy link
Copy Markdown
Owner

Problem

The previous Discord-payload fix (#27 / #22) added a run: comment that referenced ${{ }} literally:

# title/URL via env also avoids shell-injection from `${{ }}` in `run:`.

GitHub Actions evaluates ${{ … }} across the entire run: script block — it does not skip shell # comments — so it saw an empty expression and rejected the file:

Invalid workflow file: .github/workflows/add_issues_to_project.yml
(Line: 36, Col: 14): An expression was expected

That invalidated the whole workflow, so the issue-opened automation (add-to-project + label + Discord) stopped running entirely.

Fix

Reworded the comment so no ${{ token appears anywhere in the run: block. The ${{ }} expressions that remain are only in with: / env: values, which are valid expression contexts. Verified ${{ now appears solely on the github-token / env: lines, and the YAML parses.

🤖 Generated with Claude Code

…flow file)

GitHub Actions parses ${{ }} expressions inside the entire run: block,
including shell # comments. The comment added in the previous Discord-payload
fix referenced ${{ }} literally, which produced "An expression was expected"
(Line 36) and invalidated the whole workflow. Reworded the comment so no
template-expression token appears anywhere in the run: block.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@swstegall
swstegall merged commit 07b1b46 into develop May 31, 2026
5 checks passed
@swstegall
swstegall deleted the fix/discord-notify-workflow-expression branch May 31, 2026 20:26
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