Skip to content

Commit

Permalink
Merge pull request #5 from CoffeeBeansLabs/dev
Browse files Browse the repository at this point in the history
bug fix for file based approach
  • Loading branch information
vijayamadhavareddy authored May 17, 2024
2 parents c875e2c + 0f580e3 commit aa9325a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@ on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: test
run: echo "test"
- name: Checkout repository
uses: actions/checkout@v4
- name: test-file
uses: ./
with:
params-file: ./test.json
4 changes: 2 additions & 2 deletions src/aws_ssm.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ def run(aws_parameters: dict[str, AwsParameter]):


if __name__ == '__main__':
input_params = os.getenv('INPUT_PARAMS')
params_inline = parse_input_params(input_params) if input_params is not None else {}
input_params = os.getenv('INPUT_PARAMS', None)
params_inline = parse_input_params(input_params) if input_params is not None and input_params != '' else {}
params_from_file = {}
params_file_path = os.getenv('INPUT_PARAMS_FILE_PATH')
if params_file_path is not None and params_file_path != "":
Expand Down
2 changes: 1 addition & 1 deletion src/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def ensure_env_input(input_params: str):

def value_to_aws_parameter(param_name, param_value):
parsed_value_json = ensure_json_input(param_value)
if parsed_value_json is None:
if parsed_value_json is None or isinstance(parsed_value_json, dict) is False:
return AwsParameter(name=param_name, value=param_value)
value = parsed_value_json.get('value') if parsed_value_json.get('value') is not None else None
param_type = parsed_value_json.get('type') if parsed_value_json.get('type') is not None else 'String'
Expand Down

0 comments on commit aa9325a

Please sign in to comment.