Skip to content

Commit 67f2280

Browse files
update finish-exercise workflow to use exercise-finished README template (#25)
1 parent 2158e70 commit 67f2280

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

.github/workflows/finish-exercise.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,22 @@ jobs:
2828
with:
2929
repository: skills/exercise-toolkit
3030
path: exercise-toolkit
31-
ref: v0.1.0
31+
ref: 5da8e8a723fc1ee7518ff7f2f93d8a8d19df1cde
3232

33-
- name: Build message - congratulations
34-
id: build-message-congratulations
33+
- name: Build congratulations message from template
34+
id: build-new-readme
3535
uses: skills/action-text-variables@v1
3636
with:
37-
template-file: exercise-toolkit/markdown-templates/readme/congratulations.md
37+
template-file: exercise-toolkit/markdown-templates/readme/exercise-finished.md
3838
template-vars: |
3939
login=${{ github.actor }}
40+
issue_url=${{ inputs.issue-url }}
4041
41-
- name: Update README - congratulations
42-
run: |
43-
# Add "Congratulations" to the start of the README
44-
orig_readme=$(cat README.md)
45-
new_readme="$CONGRATULATIONS_TEXT $orig_readme"
46-
echo "$new_readme" > README.md
42+
- name: Overwrite README
4743
env:
48-
CONGRATULATIONS_TEXT: ${{ steps.build-message-congratulations.outputs.updated-text }}
44+
README_TEXT: ${{ steps.build-new-readme.outputs.updated-text }}
45+
run: echo "$README_TEXT" > README.md
46+
4947
- name: Update README - congratulations
5048
uses: EndBug/add-and-commit@v9
5149
with:

0 commit comments

Comments
 (0)