Skip to content

Create Example Repos #31

Create Example Repos

Create Example Repos #31

name: Create Example Repos
on:
workflow_dispatch:
inputs:
provisionCount:
description: 'Number of repos to provision'
required: true
default: 1
schedule:
- cron: "5 23 * * 5,6"
jobs:
create:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Configure contributor
run: |
git config --global user.email "github-actions@github.com"
git config --global user.name "GitHub Actions"
- name: Run script
shell: pwsh
env:
AZURE_DEVOPS_CREATE_PAT: ${{ secrets.AZURE_DEVOPS_CREATE_PAT }}
TEMP: ${{ runner.temp }}
PROVISIONCOUNT: ${{ vars.PROVISIONCOUNT }}
MANUAL_RUN: ${{ github.event.inputs.provisionCount }}
run: |
# check if we are running from workflow_dispatch
if ("${{ github.event_name }}" -eq "workflow_dispatch") {
# override the provision count from the input
$env:PROVISIONCOUNT = $env:MANUAL_RUN
}
.\make.ps1 -command "provision" -provisionCount $env:PROVISIONCOUNT