From 97b692427108d4c3d0da141b5b7e92bb190514f7 Mon Sep 17 00:00:00 2001 From: Yohan Belval Date: Fri, 6 Dec 2024 20:40:59 +0000 Subject: [PATCH] fix(test): simplify cache key creation --- test/action.yaml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/test/action.yaml b/test/action.yaml index f4a1f00..5d5ade3 100644 --- a/test/action.yaml +++ b/test/action.yaml @@ -48,19 +48,13 @@ runs: - name: Configure Terraform plugin cache shell: bash run: | - echo "TF_PLUGIN_CACHE_DIR=${{ runner.temp }}/.terraform.d/plugin-cache" >>"$GITHUB_ENV" mkdir --parents "${{ runner.temp }}.terraform.d/plugin-cache" - - name: Check for terraform lockfiles - id: check_terraform_lockfiles - if: inputs.s3-bucket-name != '' - uses: andstor/file-existence-action@v3 - with: - files: "**/.terraform.lock.hcl" + echo "TF_PLUGIN_CACHE_DIR=${{ runner.temp }}/.terraform.d/plugin-cache" >>"$GITHUB_ENV" - name: Compute terraform plugin cache key if: inputs.s3-bucket-name != '' id: tf_plugin_cache_key run: | - echo "key=terraform-${{ runner.os }}-${{ steps.check_terraform_lockfiles.outputs.files_exists == 'true' && hashFiles('**/.terraform.lock.hcl') || hashFiles('**/terraform.tf', '**/versions.tf') }}" >> $GITHUB_OUTPUT + echo "key=terraform-${{ runner.os }}-${{ hashFiles('**/.terraform.lock.hcl', '**/terraform.tf', '**/versions.tf') }}" >> $GITHUB_OUTPUT shell: bash - name: Load cached terraform plugins if available if: inputs.s3-bucket-name != ''