Repository navigation
Expand file tree
/
Copy pathstudent-progression.yml
More file actions
52 lines (45 loc) · 1.62 KB
/
Copy pathstudent-progression.yml
File metadata and controls
52 lines (45 loc) · 1.62 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
name: Student Progression Bot
on:
issues:
types: [closed]
workflow_dispatch:
inputs:
start_challenge:
description: "Challenge number to create, usually 1 for Day 1 or 10 for Day 2"
required: true
default: "1"
assignee:
description: "GitHub username to assign when manually starting progression."
required: true
concurrency:
group: student-progression-${{ github.event.issue.number || github.run_id }}
cancel-in-progress: true
permissions:
contents: write
issues: write
# Needed to open the seeded "Peer Simulation: Improve contribution
# guidance" pull request that Challenges 4-13 reference.
pull-requests: write
jobs:
create-next-challenge:
name: Create Next Challenge Issue
runs-on: ubuntu-latest
timeout-minutes: 10
if: github.event_name == 'workflow_dispatch' || startsWith(github.event.issue.title, 'Challenge ')
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Create challenge issue
run: node .github/scripts/challenge-progression.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_EVENT_NAME: ${{ github.event_name }}
GITHUB_ACTOR: ${{ github.actor }}
CLOSED_ISSUE_TITLE: ${{ github.event.issue.title }}
START_CHALLENGE: ${{ github.event.inputs.start_challenge }}
CHALLENGE_ASSIGNEE: ${{ github.event.inputs.assignee || github.event.issue.assignee.login || '' }}