-
-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (39 loc) · 1.33 KB
/
createExampleRepos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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"
permissions:
contents: read
jobs:
create:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Configure contributor
run: |
git config --global user.email "[email protected]"
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