Skip to content

Commit ffbaad3

Browse files
authored
Merge pull request #185 from ksivamuthu/fix-name-params
Fixing the command passing name parameters
2 parents 1fa25e7 + e478c67 commit ffbaad3

File tree

4 files changed

+25
-22
lines changed

4 files changed

+25
-22
lines changed

action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ inputs:
2222
tag:
2323
required: false
2424
description: "ecr tag name"
25+
resource-tags:
26+
required: false
27+
description: "resource tags, comma separated key=value pairs"
2528
path:
2629
required: false
2730
description: "path name"

dist/index.js

Lines changed: 9 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ async function deployApp(): Promise<void> {
124124
const env = core.getInput('env')
125125
const name = core.getInput('name')
126126
const tag = core.getInput('tag')
127+
const resourceTags = core.getInput('resource-tags')
127128
const path = core.getInput('path') || '.'
128129

129130
const force = core.getInput('force') === 'true'
@@ -136,19 +137,19 @@ async function deployApp(): Promise<void> {
136137
throw new Error('Environment is required')
137138
}
138139

139-
const deploy = await exec('copilot', [
140-
'deploy',
141-
'--app',
142-
app,
143-
'--env',
144-
env,
145-
name ? `--name ${name}` : '',
146-
tag ? `--tag ${tag}` : '',
147-
force ? '--force' : ''
148-
], { cwd: path });
140+
const cmd = `copilot deploy \
141+
--app ${app} \
142+
--env ${env} \
143+
${name ? `--name ${name}` : ''} \
144+
${tag ? `--tag ${tag}` : ''} \
145+
${force ? '--force' : ''} \
146+
${resourceTags ? `--resource-tags ${resourceTags}` : ''}`
147+
148+
const deploy = await exec(cmd, [], {cwd: path})
149149

150150
core.debug(
151-
`Deploying app ${app} to env ${env} ${force ? 'with force' : ''
151+
`Deploying app ${app} to env ${env} ${
152+
force ? 'with force' : ''
152153
} is done ${deploy}`
153154
)
154155

0 commit comments

Comments
 (0)