1
- name : Step 4
1
+ name : Step 3
2
2
3
3
on :
4
4
pull_request :
@@ -13,53 +13,50 @@ permissions:
13
13
issues : write
14
14
15
15
env :
16
- REVIEW_FILE : " .github/steps/X-finish .md"
16
+ REVIEW_FILE : " .github/steps/x-review .md"
17
17
18
18
jobs :
19
19
find_exercise :
20
- if : github.event.pull_request.merged == true
20
+ if : |
21
+ github.event.pull_request.merged == true &&
22
+ github.head_ref == 'my-resume'
21
23
name : Find Exercise Issue
22
- uses : skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@v0.5 .0
24
+ uses : skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@v0.7 .0
23
25
24
26
post_review_content :
25
27
name : Post review content
26
28
needs : [find_exercise]
27
29
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
32
30
env :
33
- ISSUE_URL : ${{ needs.find_exercise.outputs.issue-url }}
31
+ ISSUE_REPOSITORY : ${{ github.repository }}
32
+ ISSUE_NUMBER : ${{ needs.find_exercise.outputs.issue-number }}
34
33
35
34
steps :
36
35
- name : Checkout
37
36
uses : actions/checkout@v4
38
37
39
- - name : Create comment - add step content
40
- run : |
41
- gh issue comment "$ISSUE_URL" \
42
- --body-file "$REVIEW_FILE"
38
+ - name : Get response templates
39
+ uses : actions/checkout@v4
40
+ with :
41
+ repository : skills/exercise-toolkit
42
+ path : exercise-toolkit
43
+ ref : v0.7.0
44
+
45
+ - name : Create comment - add review content
46
+ uses :
GrantBirki/[email protected]
47
+ with :
48
+ repository : ${{ env.ISSUE_REPOSITORY }}
49
+ issue-number : ${{ env.ISSUE_NUMBER }}
50
+ file : ${{ env.REVIEW_FILE }}
51
+
52
+ - name : Disable current workflow
53
+ run : gh workflow disable "${{github.workflow}}"
43
54
env :
44
55
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45
56
46
57
finish_exercise :
47
58
name : Finish Exercise
48
59
needs : [find_exercise, post_review_content]
49
- uses : skills/exercise-toolkit/.github/workflows/finish-exercise.yml@v0.5 .0
60
+ uses : skills/exercise-toolkit/.github/workflows/finish-exercise.yml@v0.7 .0
50
61
with :
51
62
issue-url : ${{ needs.find_exercise.outputs.issue-url }}
52
-
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}}"
64
- env :
65
- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments