-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (49 loc) · 1.61 KB
/
main.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
name: build-template
on:
workflow_dispatch:
inputs:
repository:
type: string
required: true
name:
type: string
required: true
version:
type: string
required: true
new_template:
type: string
required: true
jobs:
build-template:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
path: pros-branchline
- uses: actions/checkout@v4
with:
repository: ${{ github.event.inputs.repository }}
ref: refs/heads/master
path: template-repo
- uses: actions/checkout@v4
with:
repository: purduesigbots/pros-docs
ref: refs/heads/master
token: ${{ secrets.MY_TOKEN || github.token }}
path: pros-docs
- name: Install CLI
run: python3 -m pip install pros-cli
- name: Create template
run: pros c create-template . ${{ github.event.inputs.name }} ${{ github.event.inputs.version }} --project ${{ github.event.inputs.name }}
- name: Look for template
run: ls
- name: Set git credentials
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Move template to pros-docs
run: python3 pros-branchline/upload.py ${{ github.event.inputs.name }} ${{ github.event.inputs.version }} ${{ github.event.inputs.new_template }} ${{ secrets.MY_TOKEN }}
- name: Look for zip
run: tree pros-docs/v5/_static/branchline