-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaction.yml
35 lines (31 loc) · 1.15 KB
/
action.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
name: Octostache wrapper Action
description: A Github action to replicate the octopus variable substitution feature
branding:
icon: hash
color: purple
inputs:
variables-file:
description: An optional yaml file containing variables to use in the substitution.
required: false
files-with-substitutions:
description: 'A comma separated list of files with #{variables} that need substitution.'
required: true
runs:
using: 'composite'
steps:
- name: Run the octostash project
shell: pwsh
run: |
if ($IsWindows) {
$executablePath = "${{ github.action_path }}/.build-win/OctostacheCmd.exe"
}
else {
$executablePath = "${{ github.action_path }}/.build-linux/OctostacheCmd"
chmod 777 $executablePath
}
if ("${{ inputs.variables-file }}") {
Invoke-Expression "$executablePath --files-with-substitutions `"${{ inputs.files-with-substitutions }}`" --variables-file `"${{ inputs.variables-file }}`""
}
else {
Invoke-Expression "$executablePath --files-with-substitutions `"${{ inputs.files-with-substitutions }}`""
}