Skip to content

build-template

build-template #39

Workflow file for this run

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