From b5e694cc6041289ecc33cf3185645bcb0d11af7c Mon Sep 17 00:00:00 2001 From: Tim Jespers Date: Mon, 1 Jul 2024 10:47:35 +0200 Subject: [PATCH] feat: tf token support (#33) Co-authored-by: Johnnie Ho --- action.yml | 3 +++ entrypoint.sh | 1 + 2 files changed, 4 insertions(+) diff --git a/action.yml b/action.yml index 27406f8..9c06bea 100644 --- a/action.yml +++ b/action.yml @@ -8,6 +8,9 @@ inputs: workdir: description: 'Working directory relative to the root directory.' default: '.' + terraform_cloud_token: + description: 'The terraform token for authentication with private registries.' + default: '' ### Flags for reviewdog ### level: description: 'Report level for reviewdog [info,warning,error]' diff --git a/entrypoint.sh b/entrypoint.sh index a8dbe84..364df52 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -13,6 +13,7 @@ wget -q https://releases.hashicorp.com/terraform/"${TERRAFORM_VERSION}"/terrafor && rm -rf ./terraform_"${TERRAFORM_VERSION}"_linux_amd64.zip export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}" +export TF_TOKEN_app_terraform_io="${INPUT_TERRAFORM_CLOUD_TOKEN}" jq_script=' .diagnostics[]