-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
60 lines (57 loc) · 1.96 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: 'FireflyCI'
description: 'GitHub action for the command-line interface of the FireflyCI Firefly actions'
inputs:
version:
description: 'FireflyCI Version'
required: false
default: "latest"
command:
description: 'FireflyCI command to execute [post-apply, post-plan]'
required: true
plan-output-file:
description: 'Path to the plan output file'
required: false
default: ''
init-log-file:
description: 'Path to the init log file'
required: false
default: ''
plan-json-log-file:
description: 'Path to the plan JSON log file'
required: false
default: ''
plan-raw-log-file:
description: 'Path to the plan raw log file'
required: false
default: ''
apply-log-file:
description: 'Path to the apply log file'
required: false
default: ''
workspace:
description: 'Workspace identifier'
required: true
default: ''
args:
description: 'Additional arguments for the fireflyci executed command'
default: ''
context:
description: 'The working directory of the IaC deployment'
default: ''
runs:
using: 'docker'
image: 'docker://public.ecr.aws/firefly/fireflyci:v0.4.8'
entrypoint: '/bin/sh'
args:
- '-c'
- >-
git config --global --add safe.directory /github/workspace &&
${{ inputs.context != '' && format('cd {0} && ', inputs.context) || '' }}
/app/fireflyci ${{ inputs.command }}
${{ inputs.init-log-file != '' && format('-i {0}', inputs.init-log-file) || '' }}
${{ inputs.plan-output-file != '' && format('-f {0}', inputs.plan-output-file) || '' }}
${{ inputs.plan-raw-log-file != '' && format('--plan-output-raw-log-file {0}', inputs.plan-raw-log-file) || '' }}
${{ inputs.plan-json-log-file != '' && format('-l {0}', inputs.plan-json-log-file) || '' }}
${{ inputs.apply-log-file != '' && format('-f {0}', inputs.apply-log-file) || '' }}
${{ inputs.workspace != '' && format('-w {0}', inputs.workspace) || '' }}
${{ inputs.args }}