From 6518ac8dd9ba8564bef52df61f9d3b533d2fc18b Mon Sep 17 00:00:00 2001 From: Satoshi Tanaka Date: Thu, 21 Jan 2021 10:49:20 +0900 Subject: [PATCH 1/3] update .terraform-version in project root directory --- entrypoint.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 722a0f0..0dedbd4 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -24,7 +24,10 @@ function subcommandTerraform { echo "$VERSION" > "$TFENV_VERSION_FILE" fi done - git add . + if [ -f ".terraform-version" ]; then + echo "$VERSION" > ".terraform-version" + fi + git add . fi git commit -m "$UPDATE_MESSAGE" From a8936b6fbd74101d62578e869a17823efe362873 Mon Sep 17 00:00:00 2001 From: wadason Date: Fri, 11 Jun 2021 17:13:34 +0900 Subject: [PATCH 2/3] Fix tfupdate options default value --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 722a0f0..2784db7 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -68,7 +68,7 @@ if [ "${INPUT_TFUPDATE_PATH}" != "" ]; then TFUPDATE_PATH=${INPUT_TFUPDATE_PATH} fi -TFUPDATE_OPTIONS="" +TFUPDATE_OPTIONS="-r" if [ "${INPUT_TFUPDATE_OPTIONS}" != "" ]; then TFUPDATE_OPTIONS=${INPUT_TFUPDATE_OPTIONS} fi From aecf6041c48126afa39992dc820bce6b2aebb6e1 Mon Sep 17 00:00:00 2001 From: Takashi Masuda Date: Mon, 23 Oct 2023 23:47:19 +0900 Subject: [PATCH 3/3] Fix the following git error Update terraform to latest Run masutaka/tfupdate-github-actions@master (snip) fatal: detected dubious ownership in repository at '/github/workspace' To add an exception for this directory, call: git config --global --add safe.directory /github/workspace --- entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/entrypoint.sh b/entrypoint.sh index 722a0f0..e9281c3 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -103,6 +103,7 @@ fi cd ${GITHUB_WORKSPACE}/ export GITHUB_TOKEN +git config --global --add safe.directory $GITHUB_WORKSPACE git remote set-url origin https://x-access-token:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git git config --global user.email "action@github.com" git config --global user.name "GitHub Action"