Skip to content

ci: add regression test for step output interpolation (#68) - #73

Merged
appleboy merged 1 commit into
masterfrom
test/issue-68-github-output
Aug 16, 2026
Merged

ci: add regression test for step output interpolation (#68)#73
appleboy merged 1 commit into
masterfrom
test/issue-68-github-output

Conversation

@appleboy

Copy link
Copy Markdown
Owner

Summary

Add a CI regression test that reproduces the exact scenario reported in issue #68: a step writes a value to $GITHUB_OUTPUT, a follow-up step asserts the runner interpolates ${{ steps.<id>.outputs.<name> }} correctly, and the value is then sent through the message input with format: markdown.

This proves the reported scenario works end to end. Expression interpolation happens in the GitHub Actions runner before the action container starts, so the action only ever receives the final string — the "not work" symptom in #68 is caused by workflow configuration on the caller side (most commonly a missing id: on the step that writes the output, or an output produced in a different job without a jobs.<id>.outputs mapping), not by telegram-action.

Verified green on run 31923863537:

  • verify step output is interpolated executed test "42" = "42" — the expression was expanded by the runner.
  • The action received message: There are currently 42 discussions, come on! and the Telegram message was delivered successfully.

Related issues

Architecture / flow

flowchart TD
    A["set step output<br/>(id: repo-discussion)<br/>echo discussionCount=42 >> $GITHUB_OUTPUT"] --> B["verify step output is interpolated<br/>test '42' = '42'"]
    B --> C["send message with step output<br/>uses: ./ with message containing<br/>steps.repo-discussion.outputs.discussionCount"]
    style A fill:#d4edda,stroke:#28a745
    style B fill:#d4edda,stroke:#28a745
    style C fill:#d4edda,stroke:#28a745
Loading

AI authorship

  • No AI was used
  • AI was used
    • Tool / model: Claude Code (Claude Fable 5)
    • AI-authored files: .github/workflows/ci.yml (new test steps)
    • Human line-by-line reviewed: None — not yet reviewed by a human.

Change classification

  • Leaf change
  • Core change

CI-only test addition; no action code, inputs, or published image are touched.

Plan reference

Prove issue #68's scenario ($GITHUB_OUTPUT step output used in the message input) works, as a permanent regression test in CI.

Verification

  • Automated: Full telegram message workflow ran green on this branch — run 31923863537. The new steps interpolated the output and delivered the Telegram message.
  • Manual: Inspected run logs confirming test "42" = "42" and message: There are currently 42 discussions, come on!.
  • Not run: N/A

Security check

  • No secrets in the diff
  • External inputs are validated
  • Permission checks are tested
  • Errors do not leak internals
  • N/A - no external or security-sensitive interface changed

Risk and rollback

  • Risk: Minimal — adds three CI steps to the existing build job; worst case is a CI failure on this workflow.
  • Rollback: Revert the single commit (git revert 6544097).

Reviewer guide

  • Read carefully: The three new steps in .github/workflows/ci.yml (set step output, verify step output is interpolated, send message with step output).
  • Spot-check: Nothing else changed.

🤖 Generated with Claude Code

Reproduce the exact scenario from issue #68: write a value to
$GITHUB_OUTPUT in a step with an id, assert the runner interpolates
it, then send it through the message input with format: markdown.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 16, 2026 03:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a CI regression test for issue #68 by creating a step output via $GITHUB_OUTPUT, asserting the GitHub Actions runner interpolates steps.<id>.outputs.<name> correctly, and then sending that interpolated value through this action using format: markdown.

Changes:

  • Add a step that writes discussionCount=42 to $GITHUB_OUTPUT (with an id for downstream reference).
  • Add a shell assertion step that fails if ${{ steps.repo-discussion.outputs.discussionCount }} is not interpolated to 42.
  • Add a uses: ./ action invocation that sends a Telegram message containing the interpolated step output (mirrors the issue #68 scenario).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@appleboy
appleboy merged commit a2d0caf into master Aug 16, 2026
7 checks passed
@appleboy
appleboy deleted the test/issue-68-github-output branch August 16, 2026 03:28
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.

2 participants