-
Notifications
You must be signed in to change notification settings - Fork 31
101 lines (87 loc) · 3.14 KB
/
Copy path3-step.yml
File metadata and controls
101 lines (87 loc) · 3.14 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Step 3
on:
issue_comment:
types: [created]
permissions:
contents: write
actions: write
issues: write
env:
STEP_4_FILE: ".github/steps/4-step.md"
jobs:
check_keywords:
name: Check issue comment text for required keyword
runs-on: ubuntu-latest
steps:
- name: Check for professortocat reference
id: check_professortocat
uses: skills/action-keyphrase-checker@v1
with:
text: ${{ github.event.comment.body }}
keyphrase: "professortocat"
case-sensitive: false
minimum-occurrences: 1
find_exercise:
name: Find Exercise Issue
uses: skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@v0.8.1
load_config:
needs: [find_exercise]
name: Load Config File
runs-on: ubuntu-latest
outputs:
config: ${{ steps.load-config.outputs.result }}
steps:
- uses: actions/checkout@v6
- name: Load YAML config with yq
id: load-config
uses: mikefarah/yq@v4.52.4
with:
cmd: yq eval -o=json './ado/config.yml'
post_next_step_content:
name: Post next step content
needs: [find_exercise, check_keywords, load_config]
runs-on: ubuntu-latest
env:
ISSUE_REPOSITORY: ${{ github.repository }}
ISSUE_NUMBER: ${{ needs.find_exercise.outputs.issue-number }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Get response templates
uses: actions/checkout@v6
with:
repository: skills/exercise-toolkit
path: exercise-toolkit
ref: v0.8.1
- name: Create comment - step finished
uses: GrantBirki/comment@v2.1.1
with:
repository: ${{ env.ISSUE_REPOSITORY }}
issue-number: ${{ env.ISSUE_NUMBER }}
file: exercise-toolkit/markdown-templates/step-feedback/step-finished-prepare-next-step.md
vars: |
next_step_number: 4
- name: Create comment - add step content
uses: GrantBirki/comment@v2.1.1
with:
repository: ${{ env.ISSUE_REPOSITORY }}
issue-number: ${{ env.ISSUE_NUMBER }}
file: ${{ env.STEP_4_FILE }}
vars: |
ado_url: ${{ fromJson(needs.load_config.outputs.config).ado_url }}
ado_project_name: ${{ fromJson(needs.load_config.outputs.config).ado_project_name }}
ado_repository_name: ${{ fromJson(needs.load_config.outputs.config).ado_repository_name }}
github_org: ${{ fromJson(needs.load_config.outputs.config).github_org }}
target_github_repo_name: ${{ fromJson(needs.load_config.outputs.config).target_github_repo_name }}
- name: Create comment - watching for progress
uses: GrantBirki/comment@v2.1.1
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 4"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}