-
Notifications
You must be signed in to change notification settings - Fork 1
149 lines (124 loc) · 5.5 KB
/
setup.yml
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
# This workflow should be run once by starring the repo to create the needed issues.
name: Setup repo by creating issues
# Manually trigger this workflow for setting it up by clicking the star button. Only do this once.
# Borrowed from https://dev.to/s_abderemane/manual-trigger-with-github-actions-279e
on:
watch:
types: [started]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Only allows repo owner to initiate
if: github.actor == 'padilla410'
# Steps represent a sequence of tasks that will be executed as part of the job
# Issue creation steps use GitHub action, https://github.com/marketplace/actions/create-issue-from-file
steps:
# Seems like you need this first for all actions ...
- name: Checkout repository
uses: actions/checkout@v1
# Replace the README with the course startup version
- name: Update README.md
run: |
cat ./.github/commit_content/readme_participant_start.md > ./README.md
# Updating a file uses the GitHub action, https://github.com/marketplace/actions/update-files-on-github
- name: Commit updates to README.md
uses: test-room-7/action-update-file@v1
with:
file-path: README.md
commit-msg: instructions for starting the course
github-token: ${{ secrets.GITHUB_TOKEN }}
# Add new issues!
- name: Issue 1
uses: peter-evans/create-issue-from-file@v4
with:
title: How to start working on a new project
content-filepath: ./.github/issues_to_create/issue_01.md
- name: Issue 2
uses: peter-evans/create-issue-from-file@v4
with:
title: Create a copy of the main repository (fork)
content-filepath: ./.github/issues_to_create/issue_02.md
- name: Issue 3
uses: peter-evans/create-issue-from-file@v4
with:
title: Create a local copy (clone)
content-filepath: ./.github/issues_to_create/issue_03.md
- name: Issue 4
uses: peter-evans/create-issue-from-file@v4
with:
title: Link your clone to the canonical repo
content-filepath: ./.github/issues_to_create/issue_04.md
- name: Issue 5
uses: peter-evans/create-issue-from-file@v4
with:
title: Your first commit
content-filepath: ./.github/issues_to_create/issue_05.md
- name: Issue 6
uses: peter-evans/create-issue-from-file@v4
with:
title: Make a second commit for practice
content-filepath: ./.github/issues_to_create/issue_06.md
- name: Issue 7
uses: peter-evans/create-issue-from-file@v4
with:
title: Move your local changes to your online repo
content-filepath: ./.github/issues_to_create/issue_07.md
- name: Issue 8
uses: peter-evans/create-issue-from-file@v4
with:
title: Request to add your changes to the canonical repo
content-filepath: ./.github/issues_to_create/issue_08.md
# Closing this issue triggers a new commit bc it has the trigger-collab label
- name: Issue 9
uses: peter-evans/create-issue-from-file@v4
with:
title: Closing the loop
content-filepath: ./.github/issues_to_create/issue_09.md
labels: trigger-collab
- name: Issue 10
uses: peter-evans/create-issue-from-file@v4
with:
title: Get a collaborator's content locally
content-filepath: ./.github/issues_to_create/issue_10.md
# Closing this issue triggers the merge conflict creation action bc it has the trigger-conflict label
- name: Issue 11
uses: peter-evans/create-issue-from-file@v4
with:
title: Add two new sections of the story
content-filepath: ./.github/issues_to_create/issue_11.md
labels: trigger-conflict
- name: Issue 12
uses: peter-evans/create-issue-from-file@v4
with:
title: Pull down more new changes from your collaborator
content-filepath: ./.github/issues_to_create/issue_12.md
- name: Issue 13
uses: peter-evans/create-issue-from-file@v4
with:
title: Conquer a merge conflict!
content-filepath: ./.github/issues_to_create/issue_13.md
- name: Issue 14
uses: peter-evans/create-issue-from-file@v4
with:
title: Request newest set of changes be merged to the canonical repo
content-filepath: ./.github/issues_to_create/issue_14.md
- name: Issue 15
uses: peter-evans/create-issue-from-file@v4
with:
title: Close another loop after a merged PR
content-filepath: ./.github/issues_to_create/issue_15.md
- name: Issue 16
uses: peter-evans/create-issue-from-file@v4
with:
title: Using a gitignore file
content-filepath: ./.github/issues_to_create/issue_16.md
# Closing this issue triggers the README to be updated bc it has the trigger-complete label
- name: Issue 17
uses: peter-evans/create-issue-from-file@v4
with:
title: In conclusion ...
content-filepath: ./.github/issues_to_create/issue_17.md
labels: trigger-complete