Skip to content

Commit ea6c256

Browse files
committed
used new strucutre of end exercise
1 parent 478559c commit ea6c256

File tree

2 files changed

+25
-85
lines changed

2 files changed

+25
-85
lines changed

.github/workflows/4-merge-your-pull-request.yml

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,49 +13,53 @@ permissions:
1313
issues: write
1414

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

1818
jobs:
1919
find_exercise:
2020
if: github.event.pull_request.merged == true
2121
name: Find Exercise Issue
2222
uses: skills/exercise-toolkit/.github/workflows/[email protected]
2323

24-
post_next_step_content:
25-
name: Post next step content
24+
post_review_content:
25+
name: Post review content
2626
needs: [find_exercise]
2727
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
2832
env:
2933
ISSUE_URL: ${{ needs.find_exercise.outputs.issue-url }}
3034

3135
steps:
3236
- name: Checkout
3337
uses: actions/checkout@v4
3438

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-
4239
- name: Create comment - add step content
4340
run: |
4441
gh issue comment "$ISSUE_URL" \
45-
--body-file "$STEP_5_FILE"
42+
--body-file "$REVIEW_FILE"
4643
env:
4744
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4845

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 }}
5552

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}}"
6064
env:
6165
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/5-finish.yml

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)