Skip to content

Commit 96fa8b5

Browse files
feat: add step finished messages (#1090)
1 parent 6b01819 commit 96fa8b5

3 files changed

Lines changed: 48 additions & 16 deletions

File tree

.github/workflows/1-step.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,22 @@ jobs:
3535
path: exercise-toolkit
3636
ref: v0.4.0
3737

38+
- name: Build message - step finished
39+
id: build-message-step-finish
40+
uses: skills/action-text-variables@v2
41+
with:
42+
template-file: exercise-toolkit/markdown-templates/step-feedback/step-finished-prepare-next-step.md
43+
template-vars: |
44+
next_step_number: 2
45+
46+
- name: Create comment - step finished
47+
run: |
48+
gh issue comment "$ISSUE_URL" \
49+
--body "$ISSUE_BODY"
50+
env:
51+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
ISSUE_BODY: ${{ steps.build-message-step-finish.outputs.updated-text }}
53+
3854
- name: Build comment - add step content
3955
id: build-comment
4056
uses: skills/action-text-variables@v2

.github/workflows/2-step.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,22 @@ jobs:
3939
path: exercise-toolkit
4040
ref: v0.4.0
4141

42+
- name: Build message - step finished
43+
id: build-message-step-finish
44+
uses: skills/action-text-variables@v2
45+
with:
46+
template-file: exercise-toolkit/markdown-templates/step-feedback/step-finished-prepare-next-step.md
47+
template-vars: |
48+
next_step_number: 3
49+
50+
- name: Create comment - step finished
51+
run: |
52+
gh issue comment "$ISSUE_URL" \
53+
--body "$ISSUE_BODY"
54+
env:
55+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
ISSUE_BODY: ${{ steps.build-message-step-finish.outputs.updated-text }}
57+
4258
- name: Build comment - add step content
4359
id: build-comment
4460
uses: skills/action-text-variables@v2

.github/workflows/3-step.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -79,22 +79,6 @@ jobs:
7979
if: contains(steps.*.outcome, 'failure')
8080
run: exit 1
8181

82-
- name: Build message - step finished
83-
id: build-message-step-finish
84-
uses: skills/action-text-variables@v2
85-
with:
86-
template-file: exercise-toolkit/markdown-templates/step-feedback/step-finished-prepare-next-step.md
87-
template-vars: |
88-
next_step_number: 4
89-
90-
- name: Update comment - step finished
91-
run: |
92-
gh issue comment "$ISSUE_URL" \
93-
--body "$ISSUE_BODY"
94-
env:
95-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
96-
ISSUE_BODY: ${{ steps.build-message-step-finish.outputs.updated-text }}
97-
9882
post_next_step_content:
9983
name: Post next step content
10084
needs: [find_exercise, check_step_work]
@@ -113,6 +97,22 @@ jobs:
11397
path: exercise-toolkit
11498
ref: v0.4.0
11599

100+
- name: Build message - step finished
101+
id: build-message-step-finish
102+
uses: skills/action-text-variables@v2
103+
with:
104+
template-file: exercise-toolkit/markdown-templates/step-feedback/step-finished-prepare-next-step.md
105+
template-vars: |
106+
next_step_number: 4
107+
108+
- name: Create comment - step finished
109+
run: |
110+
gh issue comment "$ISSUE_URL" \
111+
--body "$ISSUE_BODY"
112+
env:
113+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
114+
ISSUE_BODY: ${{ steps.build-message-step-finish.outputs.updated-text }}
115+
116116
- name: Create comment - add step content
117117
run: |
118118
gh issue comment "$ISSUE_URL" \

0 commit comments

Comments
 (0)