Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timeout option support to action.yml #8

Merged
merged 2 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"`
}
Loading