forked from ipdxco/unified-github-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (44 loc) · 1.27 KB
/
copy-templates.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
46
name: Copy Templates
on:
workflow_dispatch:
inputs:
targets:
description: "List of repository names to deploy to"
required: true
force:
description: "Force copy even if file exists"
required: false
version:
description: "Version to use for templates"
required: false
dry-run:
description: "Whether to run in dry run mode"
required: false
default: 'false'
jobs:
read-defaults:
runs-on: ubuntu-latest
outputs:
defaults: ${{ steps.defaults.outputs.defaults }}
steps:
- uses: actions/checkout@v4
- id: defaults
name: Read defaults
run: |
echo "defaults<<EOF" >> $GITHUB_OUTPUT
cat defaults.yml >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
copy-templates:
needs: read-defaults
uses: ./.github/workflows/process.yml
secrets: inherit
with:
targets: ${{ github.event.inputs.targets }}
branch: uci/copy-templates
script: copy-templates.sh
defaults: ${{ needs.read-defaults.outputs.defaults }}
override: |
force: ${{ github.event.inputs.force }}
versions:
uci: ${{ github.event.inputs.version }}
dry-run: ${{ github.event.inputs.dry-run == 'true' }}