From a2d0caf64a9fbd72d528f4ed7fc3af3e9ab64700 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sun, 16 Aug 2026 11:27:58 +0800 Subject: [PATCH] ci: add regression test for step output interpolation (#68) (#73) 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 --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cbd6eb2..c8a21e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,6 +84,28 @@ jobs: token: ${{ secrets.TELEGRAM_TOKEN }} message_file: tests/message.txt + # Regression test for issue #68: step outputs written to $GITHUB_OUTPUT + # must be usable inside the message input. The step producing the + # output needs an `id` so it can be referenced via steps..outputs. + - name: set step output + id: repo-discussion + run: | + COUNT=42 + echo "discussionCount=$COUNT" >> "$GITHUB_OUTPUT" + + - name: verify step output is interpolated + run: | + test "${{ steps.repo-discussion.outputs.discussionCount }}" = "42" + + - name: send message with step output (issue #68) + uses: ./ + with: + to: ${{ secrets.TELEGRAM_TO }} + token: ${{ secrets.TELEGRAM_TOKEN }} + message: | + There are currently ${{ steps.repo-discussion.outputs.discussionCount }} discussions, come on! + format: markdown + # - name: send message using socks5 proxy URL # uses: appleboy/telegram-action@master # with: