File tree 4 files changed +61
-6
lines changed
4 files changed +61
-6
lines changed Original file line number Diff line number Diff line change @@ -30,21 +30,21 @@ jobs:
30
30
with :
31
31
component : foo
32
32
stack : core-ue1-dev
33
- settings-path : level1.level2.level3.secrets-arn
33
+ settings-path : settings. level1.level2.level3.secrets-arn
34
34
35
35
- uses : ./
36
36
id : derived
37
37
with :
38
38
component : derived
39
39
stack : core-ue1-dev
40
- settings-path : level1.example
40
+ settings-path : settings. level1.example
41
41
42
42
- uses : ./
43
43
id : defaults
44
44
with :
45
45
component : test-defaults
46
46
stack : core-ue1-dev
47
- settings-path : level1.example
47
+ settings-path : settings. level1.example
48
48
49
49
assert :
50
50
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -96,14 +96,41 @@ components:
96
96
with :
97
97
component : foo
98
98
stack : core-ue1-dev
99
- settings-path : secrets-arn
99
+ settings-path : settings. secrets-arn
100
100
101
101
- name : Set ENV Vars with AWS Secrets Manager Secret
102
102
uses : aws-actions/aws-secretsmanager-get-secrets@v1
103
103
with :
104
104
secret-ids : ${{ steps.example.outputs.value }}
105
105
` ` `
106
106
107
+ ## Migrating from ` v0` to `v1`
108
+
109
+ Starting from `v1` the action is no longer restricted to retrieving the component config from only the `settings` section.
110
+ If you want the same behavior in `v1` as in`v0`, you should add the `settings.` prefix to the value of the `settings-path` variable.
111
+ For example, in `v1` you would provide `settings.secrets-arn` as the value to the `settings-path`
112
+ ` ` ` yaml
113
+ - name: Get Atmos Setting for Secret ARN
114
+ uses: cloudposse/github-action-atmos-get-setting@v1
115
+ id: example
116
+ with:
117
+ component: foo
118
+ stack: core-ue1-dev
119
+ settings-path: settings.secrets-arn
120
+ ` ` `
121
+
122
+ Which would provide the same output as passing only `secrets-arn` in `v0`
123
+
124
+ ` ` ` yaml
125
+ - name: Get Atmos Setting for Secret ARN
126
+ uses: cloudposse/github-action-atmos-get-setting@v0
127
+ id: example
128
+ with:
129
+ component: foo
130
+ stack: core-ue1-dev
131
+ settings-path: secrets-arn
132
+ ` ` `
133
+
107
134
108
135
109
136
Original file line number Diff line number Diff line change @@ -72,13 +72,41 @@ usage: |-
72
72
with:
73
73
component: foo
74
74
stack: core-ue1-dev
75
- settings-path: secrets-arn
75
+ settings-path: settings. secrets-arn
76
76
77
77
- name: Set ENV Vars with AWS Secrets Manager Secret
78
78
uses: aws-actions/aws-secretsmanager-get-secrets@v1
79
79
with:
80
80
secret-ids: ${{ steps.example.outputs.value }}
81
81
```
82
+
83
+ ## Migrating from `v0` to `v1`
84
+
85
+ Starting from `v1` the action is no longer restricted to retrieving the component config from only the `settings` section.
86
+ If you want the same behavior in `v1` as in`v0`, you should add the `settings.` prefix to the value of the `settings-path` variable.
87
+ For example, in `v1` you would provide `settings.secrets-arn` as the value to the `settings-path`
88
+ ```yaml
89
+ - name: Get Atmos Setting for Secret ARN
90
+ uses: cloudposse/github-action-atmos-get-setting@v1
91
+ id: example
92
+ with:
93
+ component: foo
94
+ stack: core-ue1-dev
95
+ settings-path: settings.secrets-arn
96
+ ```
97
+
98
+ Which would provide the same output as passing only `secrets-arn` in `v0`
99
+
100
+ ```yaml
101
+ - name: Get Atmos Setting for Secret ARN
102
+ uses: cloudposse/github-action-atmos-get-setting@v0
103
+ id: example
104
+ with:
105
+ component: foo
106
+ stack: core-ue1-dev
107
+ settings-path: secrets-arn
108
+ ```
109
+
82
110
83
111
include :
84
112
- " docs/github-action.md"
Original file line number Diff line number Diff line change 32
32
-s ${{ inputs.stack }} \
33
33
--format json \
34
34
--file "$OUTPUT_FILE" || echo '{}' > "$OUTPUT_FILE"
35
- value=$(jq -rc --arg key ${{ inputs.settings-path }} '.settings | getpath($key | split("."))' "$OUTPUT_FILE")
35
+ value=$(jq -rc --arg key ${{ inputs.settings-path }} '. | getpath($key | split("."))' "$OUTPUT_FILE")
36
36
echo "value=$value" >> $GITHUB_OUTPUT
You can’t perform that action at this time.
0 commit comments