This repository was archived by the owner on Jul 17, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
159 lines (137 loc) Β· 6.51 KB
/
Copy pathinitial_setup.yml
File metadata and controls
159 lines (137 loc) Β· 6.51 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
name: initial-setup
# Controls when the action will run.
on:
push:
branches:
- main
jobs:
initial-setup:
permissions: write-all
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Ensures that the main branch is created
- name: ensure_main_branch
continue-on-error: true
run: |
git checkout -b main
git push --set-upstream origin main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Ensures that the main branch is created
- name: ensure_develop_branch
continue-on-error: true
run: |
git checkout -b develop
git push --set-upstream origin develop
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Delete boring labels
- name: label_automation
continue-on-error: true
if: contains(github.event.head_commit.message, 'Initial commit')
run: |
gh label delete "bug" --confirm
gh label delete "documentation" --confirm
gh label delete "duplicate" --confirm
gh label delete "enhancement" --confirm
gh label delete "good first issue" --confirm
gh label delete "help wanted" --confirm
gh label delete "invalid" --confirm
gh label delete "question" --confirm
gh label delete "wontfix" --confirm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Create labels
- name: label_automation
continue-on-error: true
if: contains(github.event.head_commit.message, 'Initial commit')
run: gh label create "pages π " --description "Adding or rearranging pages or menus." --color "f1bcba"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: label_blocked
continue-on-error: true
if: contains(github.event.head_commit.message, 'Initial commit')
run: gh label create "blocked π§" --description "Task blocked by some other issue." --color "F9F0F4"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: label_bug
continue-on-error: true
if: contains(github.event.head_commit.message, 'Initial commit')
run: gh label create "bug π" --description "Something isn't working" --color "D73A4A"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: label_chore
continue-on-error: true
if: contains(github.event.head_commit.message, 'Initial commit')
run: gh label create "chore π¨" --description "Maintenance" --color "1F8466"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: label_data_engineering
if: contains(github.event.head_commit.message, 'Initial commit')
continue-on-error: true
run: gh label create "announcements π£" --description "Adding announcements to students" --color "e3db73"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: label_documentation
if: contains(github.event.head_commit.message, 'Initial commit')
continue-on-error: true
run: gh label create "documentation π" --description "Add or update documentation" --color "0075CA"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: label_duplicate
if: contains(github.event.head_commit.message, 'Initial commit')
continue-on-error: true
run: gh label create "teaching content π¨βπ«" --description "Slides, lecture notes, lecture plan, etc." --color "ccd3cb"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: label_eda
if: contains(github.event.head_commit.message, 'Initial commit')
continue-on-error: true
run: gh label create "exploratory analysis π¬" --description "We want to explore some data or perform some analysis that will become a feature later" --color "D4C5F9"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: label_feature_request
if: contains(github.event.head_commit.message, 'Initial commit')
continue-on-error: true
run: gh label create "assignments βοΈ" --description "Release of assignment instructions, assignment pages, marking criteria, etc." --color "d4c6b2"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: label_new_feature
if: contains(github.event.head_commit.message, 'Initial commit')
continue-on-error: true
run: gh label create "references π" --description "Changes to syllabus, academic references, "read more" links, etc." --color "e9f4e2"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: label_newcomers
if: contains(github.event.head_commit.message, 'Initial commit')
continue-on-error: true
run: gh label create "roadmap π£οΈ" --description "Computer lab (or seminar) roadmap, detailing the steps students will take or the items for discussio" --color "eff8f3"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: label_refactoring
if: contains(github.event.head_commit.message, 'Initial commit')
continue-on-error: true
run: gh label create "refactoring β»οΈ" --description "Some things just have to be re-done or re-organized" --color "C2E0C6"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: label_sprint
if: contains(github.event.head_commit.message, 'Initial commit')
continue-on-error: true
run: gh label create "sprint β‘οΈ" --description "Tasks to be done on the current sprint" --color "D5EEF5"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: label_dataviz
if: contains(github.event.head_commit.message, 'Initial commit')
continue-on-error: true
run: gh label create "dataviz πΌοΈ" --description "Visualisation-related stuff" --color "212121"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: disable_workflow
continue-on-error: true
run: gh workflow disable initial-setup
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}