Skip to content

build-template

build-template #27

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/test-branchline-uploads
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: Move template to pros-docs
env:
GH_PAT: ${{ secrets.MY_TOKEN || github.token }}
run: |
git config --global credential.helper "store --file ~/pros-docs/.git-credentials"
echo "https://${GH_PAT}@github.com" > ~/pros-docs/.git-credentials
python3 pros-branchline/upload.py ${{ github.event.inputs.name }} ${{ github.event.inputs.version }} ${{ github.event.inputs.new_template }}
- name: Look for zip
run: tree pros-docs/v5/_static/branchline