Skip to content

Commit

Permalink
Merge pull request #8 from xmtp-labs/snor/timeout-opt-env
Browse files Browse the repository at this point in the history
Add timeout option support to action.yml
  • Loading branch information
snormore committed Feb 22, 2024
2 parents c7b13bc + 4db5206 commit 41a9368
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ inputs:
description: "Require the value specified in `variable-value` to have the supplied prefix"
run-title-override:
description: "The title of the terraform run. If not specified, defaults to latest commit message"
timeout:
description: "The timeout for the terraform run. If not specified, defaults to 15 minutes"
runs:
using: "docker"
image: "Dockerfile"
Expand All @@ -34,3 +36,4 @@ runs:
TERRAFORM_VARIABLE_VALUE: ${{ inputs.variable-value }}
VARIABLE_VALUE_REQUIRED_PREFIX: ${{ inputs.variable-value-required-prefix }}
TERRAFORM_RUN_TITLE: ${{ inputs.run-title-override }}
TIMEOUT: ${{ inputs.timeout }}
2 changes: 1 addition & 1 deletion pkg/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ type Options struct {
RunTitle string `long:"run-title" env:"TERRAFORM_RUN_TITLE" description:"Title for the Terraform Run. Defaults to latest commit message if unset."`
DryRun bool `long:"dry-run" description:"Do not actually run the Terraform Run. Useful for testing."`
VariableValueRequiredPrefix string `long:"variable-value-required-prefix" env:"VARIABLE_VALUE_REQUIRED_PREFIX" description:"If set, the VariableValue must start with this prefix"`
Timeout time.Duration `long:"timeout" description:"Run timeout" default:"0"`
Timeout time.Duration `long:"timeout" env:"TIMEOUT" description:"Run timeout" default:"0"`
}

0 comments on commit 41a9368

Please sign in to comment.