Skip to content

Commit 7e75e92

Browse files
authored
Add process functions option to Github Action parameters (#36)
* Update action.yml * Update action.yml * Update action.yml * Update action.yml * Adding in updates to README.md for process-functions * Update docs to add in process-functions * Update README.yaml to add in process-functions * Update README.md
1 parent 857a956 commit 7e75e92

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ The following configuration fields moved to the `atmos.yaml` configuration file.
190190
| `enable-infracost` | `integrations.github.gitops.infracost-enabled` |
191191
| `sort-by` | `integrations.github.gitops.matrix.sort-by` |
192192
| `group-by` | `integrations.github.gitops.matrix.group-by` |
193+
| `process-functions` | `integrations.github.gitops.matrix.process-functions` |
193194

194195

195196
For example, to migrate from `v1` to `v2`, you should have something similar to the following in your `atmos.yaml`:

README.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ usage: |
184184
| `enable-infracost` | `integrations.github.gitops.infracost-enabled` |
185185
| `sort-by` | `integrations.github.gitops.matrix.sort-by` |
186186
| `group-by` | `integrations.github.gitops.matrix.group-by` |
187+
| `process-functions` | `integrations.github.gitops.matrix.process-functions` |
187188
188189
189190
For example, to migrate from `v1` to `v2`, you should have something similar to the following in your `atmos.yaml`:

action.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ inputs:
3636
required: false
3737
description: 'Number of nested matrices that should be returned as the output (from 1 to 3)'
3838
default: "2"
39+
process-functions:
40+
required: false
41+
description: 'Whether to process atmos functions'
42+
default: true
3943
outputs:
4044
selected-components:
4145
description: Selected GitOps components
@@ -136,12 +140,14 @@ runs:
136140
})
137141
) | map(.) | flatten ## Reduce to flat array
138142
run: |
139-
atmos describe stacks --format json | jq -ce "${JQUERY}" > components.json
140-
143+
process_function_arg=""
144+
if [ "${{ inputs.process-functions }}" == "false" ]; then
145+
process_function_arg="--process-functions=false"
146+
fi
147+
atmos describe stacks $process_function_arg --format json | jq -ce "${JQUERY}" > components.json
141148
components=$(cat components.json)
142149
echo "Selected components: $components"
143-
printf "%s" "components=$components" >> $GITHUB_OUTPUT
144-
150+
printf "%s" "components=$components" >> $GITHUB_OUTPUT
145151
- uses: cloudposse/github-action-matrix-extended@v0
146152
id: matrix
147153
with:

docs/github-action.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
| jq-version | The version of jq to install if install-jq is true | 1.6 | false |
1212
| nested-matrices-count | Number of nested matrices that should be returned as the output (from 1 to 3) | 2 | false |
1313
| select-filter | jq query that will be used to select atmos components | . | false |
14+
| process-functions | Whether to process functions | true | false |
1415

1516

1617
## Outputs

0 commit comments

Comments
 (0)