Skip to content

Commit a5a68b8

Browse files
committed
hiugykfhdsw<qx
1 parent 5f809dc commit a5a68b8

1 file changed

Lines changed: 21 additions & 12 deletions

File tree

.github/workflows/3-last-step.yml

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
uses: skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@v0.7.1
2121

2222
on-opened:
23-
if: github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened')
23+
if: ${{ github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened') }}
2424
runs-on: ubuntu-latest
2525
steps:
2626
- uses: actions/checkout@v4
@@ -34,6 +34,7 @@ jobs:
3434
post_review_content:
3535
name: Post review content
3636
needs: [find_exercise]
37+
if: ${{ github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened') }}
3738
runs-on: ubuntu-latest
3839
env:
3940
ISSUE_REPOSITORY: ${{ github.repository }}
@@ -43,30 +44,24 @@ jobs:
4344
- name: Checkout
4445
uses: actions/checkout@v4
4546

46-
- name: Create comment - step finished - final review next
47+
- name: Create comment, step finished, final review next
4748
uses: GrantBirki/comment@v2.1.1
4849
with:
4950
repository: ${{ env.ISSUE_REPOSITORY }}
5051
issue-number: ${{ env.ISSUE_NUMBER }}
5152
file: .github/i18n/fr/lesson-review.md
5253

53-
- name: Create comment - add review content
54+
- name: Create comment, add review content
5455
uses: GrantBirki/comment@v2.1.1
5556
with:
5657
repository: ${{ env.ISSUE_REPOSITORY }}
5758
issue-number: ${{ env.ISSUE_NUMBER }}
5859
file: ${{ env.REVIEW_FILE }}
5960

60-
- name: Disable current workflow
61-
run: gh workflow disable ".github/workflows/3-last-step.yml"
62-
env:
63-
GH_TOKEN: ${{ github.token }}
64-
continue-on-error: true
65-
6661
finish_exercise:
6762
name: Finish Exercise
68-
needs: [find_exercise, post_review_content]
69-
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
63+
needs: [find_exercise]
64+
if: ${{ github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true }}
7065
uses: skills/exercise-toolkit/.github/workflows/finish-exercise.yml@v0.7.1
7166
with:
7267
issue-url: ${{ needs.find_exercise.outputs.issue-url }}
@@ -75,10 +70,12 @@ jobs:
7570

7671
finalize_fr:
7772
name: Finalize FR
78-
needs: [find_exercise, post_review_content, finish_exercise]
73+
needs: [find_exercise, finish_exercise]
74+
if: ${{ github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true }}
7975
runs-on: ubuntu-latest
8076
env:
8177
ISSUE_NUMBER: ${{ needs.find_exercise.outputs.issue-number }}
78+
8279
steps:
8380
- name: Checkout
8481
uses: actions/checkout@v4
@@ -192,3 +189,15 @@ jobs:
192189
} else {
193190
await github.rest.issues.createComment({ owner, repo, issue_number, body });
194191
}
192+
193+
disable_step3:
194+
name: Disable Step 3
195+
needs: [finalize_fr]
196+
if: ${{ github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true }}
197+
runs-on: ubuntu-latest
198+
steps:
199+
- name: Disable workflow file
200+
run: gh workflow disable ".github/workflows/3-last-step.yml"
201+
env:
202+
GH_TOKEN: ${{ github.token }}
203+
continue-on-error: true

0 commit comments

Comments
 (0)