build-template #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |