@@ -13,49 +13,53 @@ permissions:
13
13
issues : write
14
14
15
15
env :
16
- STEP_5_FILE : " .github/steps/X-finish.md"
16
+ REVIEW_FILE : " .github/steps/X-finish.md"
17
17
18
18
jobs :
19
19
find_exercise :
20
20
if : github.event.pull_request.merged == true
21
21
name : Find Exercise Issue
22
22
uses :
skills/exercise-toolkit/.github/workflows/[email protected]
23
23
24
- post_next_step_content :
25
- name : Post next step content
24
+ post_review_content :
25
+ name : Post review content
26
26
needs : [find_exercise]
27
27
runs-on : ubuntu-latest
28
+ if : |
29
+ !github.event.repository.is_template &&
30
+ github.head_ref == 'my-resume' &&
31
+ github.event.pull_request.merged == true
28
32
env :
29
33
ISSUE_URL : ${{ needs.find_exercise.outputs.issue-url }}
30
34
31
35
steps :
32
36
- name : Checkout
33
37
uses : actions/checkout@v4
34
38
35
- - name : Get response templates
36
- uses : actions/checkout@v4
37
- with :
38
- repository : skills/exercise-toolkit
39
- path : exercise-toolkit
40
- ref : v0.5.0
41
-
42
39
- name : Create comment - add step content
43
40
run : |
44
41
gh issue comment "$ISSUE_URL" \
45
- --body-file "$STEP_5_FILE "
42
+ --body-file "$REVIEW_FILE "
46
43
env :
47
44
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
48
45
49
- - name : Create comment - watching for progress
50
- run : |
51
- gh issue comment "$ISSUE_URL" \
52
- --body-file exercise-toolkit/markdown-templates/step-feedback/watching-for-progress.md
53
- env :
54
- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
46
+ finish_exercise :
47
+ name : Finish Exercise
48
+ needs : [find_exercise, post_review_content]
49
+ uses : skills/ exercise-toolkit/.github/workflows/[email protected]
50
+ with :
51
+ issue-url : ${{ needs.find_exercise.outputs.issue-url }}
55
52
56
- - name : Disable current workflow and enable next one
57
- run : |
58
- gh workflow disable "Step 4"
59
- gh workflow enable "Step 5"
53
+ disable_workflow :
54
+ name : Disable this workflow
55
+ needs : [find_exercise, post_review_content]
56
+ runs-on : ubuntu-latest
57
+
58
+ steps :
59
+ - name : Checkout
60
+ uses : actions/checkout@v4
61
+
62
+ - name : Disable current workflow
63
+ run : gh workflow disable "${{github.workflow}}"
60
64
env :
61
65
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments