Skip to content

Commit 2981e8d

Browse files
committed
refactor: Pass GitHub context to Deno script via environment variable
1 parent 3c3ab0d commit 2981e8d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/Lark-notification.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ jobs:
2525

2626
- name: Event Message serialization
2727
id: message
28+
env:
29+
GITHUB_CONTEXT: ${{ toJSON(github) }}
2830
run: |
29-
YAML=$(echo '${{ toJSON(github) }}' | deno --allow-all .github/scripts/transform-message-for-card.ts)
31+
YAML=$(echo "$GITHUB_CONTEXT" | deno --allow-all .github/scripts/transform-message-for-card.ts)
3032
{
3133
echo 'content<<EOF'
3234
echo $YAML

0 commit comments

Comments
 (0)