From c37e0c575a57095e193d457b6e063fc93d46c6d0 Mon Sep 17 00:00:00 2001 From: Dmitry Kisler Date: Wed, 4 Oct 2023 23:11:59 +0200 Subject: [PATCH] feat: add action definition Signed-off-by: Dmitry Kisler --- action.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 action.yml diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..68228f8 --- /dev/null +++ b/action.yml @@ -0,0 +1,36 @@ +name: 'OpenTofu - Setup Tofu' +description: 'Sets up OpenTofu CLI in your GitHub Actions workflow.' +author: 'OpenTofu' +inputs: + cli_config_credentials_hostname: + description: 'The hostname of a Terraform Cloud/Enterprise instance to place within the credentials block of the OpenTofu CLI configuration file. Defaults to `app.terraform.io`.' + default: 'app.terraform.io' + required: false + cli_config_credentials_token: + description: 'The API token for a Terraform Cloud/Enterprise instance to place within the credentials block of the OpenTofu CLI configuration file.' + required: false + tofu_version: + description: 'The version of OpenTofu CLI to install. If no version is given, it will default to `latest`. Note! The CLI is built from source until the first OpenTofu official release.' + default: 'latest' + required: false + tofu_wrapper: + description: 'Whether or not to install a wrapper to wrap subsequent calls of the `tofu` binary and expose its STDOUT, STDERR, and exit code as outputs named `stdout`, `stderr`, and `exitcode` respectively. Defaults to `true`.' + default: 'true' + required: false +outputs: + stdout: + description: 'The STDOUT stream of the call to the `tofu` binary.' + value: '' + stderr: + description: 'The STDERR stream of the call to the `tofu` binary.' + value: 'Wrapper was not activated' + exitcode: + description: 'The exit code of the call to the `tofu` binary.' + value: '126' + +branding: + icon: 'terminal' + color: 'purple' +runs: + using: 'node20' + main: 'dist/index.js'