-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (61 loc) · 2.1 KB
/
2-commit-a-file.yml
File metadata and controls
73 lines (61 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Step 2 # Commit a file
# Checks if the learner completed tasks for step 2.
# - Triggers when the user makes a push to the branch 'my-first-branch' and modifies the file 'PROFILE.md'.
on:
push:
branches:
- "my-first-branch"
paths:
- "PROFILE.md"
permissions:
contents: read
actions: write
issues: write
env:
STEP_3_FILE: ".github/steps/3-open-a-pull-request.md"
jobs:
find_exercise:
name: Find Exercise Issue
uses: skills/exercise-toolkit/.github/workflows/[email protected]
post_next_step_content:
name: Post next step content
needs: [find_exercise]
runs-on: ubuntu-latest
env:
ISSUE_REPOSITORY: ${{ github.repository }}
ISSUE_NUMBER: ${{ needs.find_exercise.outputs.issue-number }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get response templates
uses: actions/checkout@v4
with:
repository: skills/exercise-toolkit
path: exercise-toolkit
ref: v0.7.0
- name: Create comment - step finished
uses: GrantBirki/[email protected]
with:
issue-number: ${{ env.ISSUE_NUMBER }}
repository: ${{ env.ISSUE_REPOSITORY }}
file: exercise-toolkit/markdown-templates/step-feedback/step-finished-prepare-next-step.md
vars: |
next_step_number: 3
- name: Create comment - add step content
uses: GrantBirki/[email protected]
with:
repository: ${{ env.ISSUE_REPOSITORY }}
issue-number: ${{ env.ISSUE_NUMBER }}
file: ${{ env.STEP_3_FILE }}
- name: Create comment - watching for progress
uses: GrantBirki/[email protected]
with:
repository: ${{ env.ISSUE_REPOSITORY }}
issue-number: ${{ env.ISSUE_NUMBER }}
file: exercise-toolkit/markdown-templates/step-feedback/watching-for-progress.md
- name: Disable current workflow and enable next one
run: |
gh workflow disable "${{github.workflow}}"
gh workflow enable "Step 3"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}