Skip to content

Commit

Permalink
chore: Option to Skip Atmos Functions (#60)
Browse files Browse the repository at this point in the history
* added option to skip terraform output

* Add skip-atmos-functions option to GitHub Action parameters

* handle log error in tests
  • Loading branch information
milldr authored Feb 4, 2025
1 parent 6b8895a commit de9cd75
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ Which would produce the same behavior as in `v1`, doing this:
| jq-force | Whether to force the installation of jq | true | false |
| jq-version | The version of jq to install if install-jq is true | 1.7 | false |
| nested-matrices-count | Number of nested matrices that should be returned as the output (from 1 to 3) | 2 | false |
| skip-atmos-functions | Skip all Atmos functions such as terraform.output | false | false |
| skip-checkout | Disable actions/checkout for head-ref. Useful for when the checkout happens in a previous step and file are modified outside of git through other actions | false | false |


Expand Down Expand Up @@ -511,7 +512,7 @@ All other trademarks referenced herein are the property of their respective owne


---
Copyright © 2017-2024 [Cloud Posse, LLC](https://cpco.io/copyright)
Copyright © 2017-2025 [Cloud Posse, LLC](https://cpco.io/copyright)


<a href="https://cloudposse.com/readme/footer/link?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/github-action-atmos-affected-stacks&utm_content=readme_footer_link"><img alt="README footer" src="https://cloudposse.com/readme/footer/img"/></a>
Expand Down
8 changes: 8 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ inputs:
required: false
description: "Number of nested matrices that should be returned as the output (from 1 to 3)"
default: "2"
skip-atmos-functions:
required: false
description: "Skip all Atmos functions such as terraform.output"
default: "false"

outputs:
affected:
Expand Down Expand Up @@ -198,6 +202,10 @@ runs:
if [[ -n "${{ inputs.atmos-stack }}" ]]; then
base_cmd+=" --stack=${{ inputs.atmos-stack }}"
fi
if [[ "${{ inputs.skip-atmos-functions }}" == "true" ]]; then
base_cmd+=" --skip=terraform.output"
fi
eval "$base_cmd"
affected=$(jq -c '.' affected-stacks.json)
Expand Down
1 change: 1 addition & 0 deletions docs/github-action.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
| jq-force | Whether to force the installation of jq | true | false |
| jq-version | The version of jq to install if install-jq is true | 1.7 | false |
| nested-matrices-count | Number of nested matrices that should be returned as the output (from 1 to 3) | 2 | false |
| skip-atmos-functions | Skip all Atmos functions such as terraform.output | false | false |
| skip-checkout | Disable actions/checkout for head-ref. Useful for when the checkout happens in a previous step and file are modified outside of git through other actions | false | false |


Expand Down
4 changes: 3 additions & 1 deletion tests/atmos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ workflows:

logs:
verbose: false
colors: true
colors: false
level: Trace
file: "/tmp/atmos.log"

# Custom CLI commands
commands:
Expand Down

0 comments on commit de9cd75

Please sign in to comment.