mirror of
https://github.com/appleboy/telegram-action.git
synced 2026-10-04 10:10:43 +09:00
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>
This commit is contained in:
co-authored by
Claude Fable 5
parent
978281de94
commit
a2d0caf64a
@@ -84,6 +84,28 @@ jobs:
|
|||||||
token: ${{ secrets.TELEGRAM_TOKEN }}
|
token: ${{ secrets.TELEGRAM_TOKEN }}
|
||||||
message_file: tests/message.txt
|
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.<id>.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
|
# - name: send message using socks5 proxy URL
|
||||||
# uses: appleboy/telegram-action@master
|
# uses: appleboy/telegram-action@master
|
||||||
# with:
|
# with:
|
||||||
|
|||||||
Reference in New Issue
Block a user