Registers an AWS AppRunner Service and deploys the application using the source code of a given GitHub repository. Supports both source code and Docker image based service
Seems like my earlier PR (#33) has broken the action for users who don't want to specify an auto-scaling-config-arn input. I didn't realise @actions/coregetInput will return an empty string if a value isn't set, rather than undefined.
Introduces a more specific test for getConfig, because exercising this through index.test.ts is quite involved
Introduces a new getOptionalInputStr helper in action-configuration, which returns string | undefined
Notes
The tests for this PR adjust the process environment to specify inputs (mimicking the environment as it would be while the action is running). This approach could also be used in index.test.ts too, as a replacement for FakeInput. This might make the tests simpler (let me know if you'd like a contribution adopting this approach).
When you specify an input in a workflow file or use a default input value, GitHub creates an environment variable for the input with the name INPUT_. The environment variable created converts input names to uppercase letters and replaces spaces with _ characters.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. I accept
Seems like my earlier PR (#33) has broken the action for users who don't want to specify an
auto-scaling-config-arn
input. I didn't realise@actions/core
getInput
will return an empty string if a value isn't set, rather than undefined.Issue #, if available: https://github.com/awslabs/amazon-app-runner-deploy/issues/36
Description of changes:
getConfig
, because exercising this throughindex.test.ts
is quite involvedgetOptionalInputStr
helper in action-configuration, which returnsstring | undefined
Notes
The tests for this PR adjust the process environment to specify inputs (mimicking the environment as it would be while the action is running). This approach could also be used in
index.test.ts
too, as a replacement forFakeInput
. This might make the tests simpler (let me know if you'd like a contribution adopting this approach).Here's the reference for GitHub Actions inputs where I discovered it sets inputs as environment variables, which is what
@actions/core
getInput
ends up reading:By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. I accept