Skip to content

Commit 47325e7

Browse files
authored
Update step 3 to use latest guidelines. Combine with step 4.
1 parent 0dc907c commit 47325e7

File tree

2 files changed

+25
-88
lines changed

2 files changed

+25
-88
lines changed

.github/workflows/3-create-your-own-conflict.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.
Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Step 4
1+
name: Step 3
22

33
on:
44
pull_request:
@@ -13,53 +13,50 @@ permissions:
1313
issues: write
1414

1515
env:
16-
REVIEW_FILE: ".github/steps/X-finish.md"
16+
REVIEW_FILE: ".github/steps/x-review.md"
1717

1818
jobs:
1919
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'
2123
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
2325

2426
post_review_content:
2527
name: Post review content
2628
needs: [find_exercise]
2729
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
3230
env:
33-
ISSUE_URL: ${{ needs.find_exercise.outputs.issue-url }}
31+
ISSUE_REPOSITORY: ${{ github.repository }}
32+
ISSUE_NUMBER: ${{ needs.find_exercise.outputs.issue-number }}
3433

3534
steps:
3635
- name: Checkout
3736
uses: actions/checkout@v4
3837

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}}"
4354
env:
4455
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4556

4657
finish_exercise:
4758
name: Finish Exercise
4859
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
5061
with:
5162
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

Comments
 (0)