Create Example Repos #31
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: 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 |