Skip to content

Commit 7d66673

Browse files
chore: update template variables and add verification steps for action outputs (#21)
1 parent 1cf5f5f commit 7d66673

File tree

1 file changed

+32
-5
lines changed

1 file changed

+32
-5
lines changed

.github/workflows/ci.yml

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,33 +49,60 @@ jobs:
4949
uses: actions/checkout@v4
5050

5151
- name: Direct Text (JSON Variables)
52+
id: direct-json
5253
uses: ./
5354
with:
5455
template-text: 'Hello {{ login }}, nice to meet you!'
5556
template-vars: >
5657
{
57-
"login": "octocat"
58+
"login": "Octobi Wan Catnobi"
5859
}
5960
61+
- name: Verify Direct Text JSON Output
62+
env:
63+
UPDATED_TEXT: ${{ steps.direct-json.outputs.updated-text }}
64+
run: |
65+
echo "$UPDATED_TEXT" | grep -q "Octobi Wan Catnobi" || exit 1
66+
6067
- name: Direct Text (ENV Variables)
68+
id: direct-env
6169
uses: ./
6270
with:
6371
template-text: 'Hello {{ login }}, nice to meet you!'
6472
template-vars: |
65-
login=octocat
73+
login=Octoclark Kentocat
74+
75+
- name: Verify Direct Text ENV Output
76+
env:
77+
UPDATED_TEXT: ${{ steps.direct-env.outputs.updated-text }}
78+
run: |
79+
echo "$UPDATED_TEXT" | grep -q "Octoclark Kentocat" || exit 1
6680
6781
- name: Text File (JSON variables)
68-
id: test-readme-same-repo
82+
id: template-file-json
6983
uses: ./
7084
with:
7185
template-file: ./examples/hello.md
7286
template-vars: >
7387
{
74-
"login": "octocat"
88+
"login": "Spidertocat"
7589
}
7690
91+
- name: Verify Text File JSON Output
92+
env:
93+
UPDATED_TEXT: ${{ steps.template-file-json.outputs.updated-text }}
94+
run: |
95+
echo "$UPDATED_TEXT" | grep -q "Spidertocat" || exit 1
96+
7797
- name: Text File (ENV variables)
98+
id: template-file-env
7899
uses: ./
79100
with:
80101
template-file: ./examples/hello.md
81-
template-vars: login=octocat
102+
template-vars: login=Codercat
103+
104+
- name: Verify Text File ENV Output
105+
env:
106+
UPDATED_TEXT: ${{ steps.template-file-env.outputs.updated-text }}
107+
run: |
108+
echo "$UPDATED_TEXT" | grep -q "Codercat" || exit 1

0 commit comments

Comments
 (0)