Skip to content

Commit 9cc520c

Browse files
authored
Merge pull request #22 from penta515/develop
「EC2: AMIを作成」アクションで世代管理番号が文字列で保存されている場合を考慮するようにした
2 parents 8aa44bb + 06cf15f commit 9cc520c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request:
55
branches:
66
- main
7+
- develop
78

89
jobs:
910
build:

internal/client/job.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,12 @@ func readRuleValues(rawJob *JobAttributes) map[string]interface{} {
248248

249249
func readActionValues(rawJob *JobAttributes) map[string]interface{} {
250250
switch rawJob.ActionType {
251+
case "create_image":
252+
switch rawJob.ActionValue["generation"].(type) {
253+
case string:
254+
generation, _ := strconv.Atoi(rawJob.ActionValue["generation"].(string))
255+
rawJob.ActionValue["generation"] = generation
256+
}
251257
case "authorize_security_group_ingress", "revoke_security_group_ingress":
252258
toPort := rawJob.ActionValue["to_port"].(float64)
253259
rawJob.ActionValue["to_port"] = strconv.Itoa(int(toPort))

0 commit comments

Comments
 (0)