Skip to content

Commit a0db945

Browse files
jamengualgoruha
andauthored
fixing cache key to match apply action cache key (#121)
* fixing cache key to match apply action cache key * fixing cache key to match apply action cache key --------- Co-authored-by: Igor Rodionov <[email protected]>
1 parent 9e3bc38 commit a0db945

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ runs:
282282
run: |
283283
STACK_NAME=$(echo "${{ inputs.stack }}" | sed 's#/#_#g')
284284
COMPONENT_PATH=${{ fromJson(steps.atmos-settings.outputs.settings).component-path }}
285+
COMPONENT_CACHE_PATH=$(realpath ${{ fromJson(steps.atmos-settings.outputs.settings).component-path }})
285286
COMPONENT_NAME=$(echo "${{ inputs.component }}" | sed 's#/#_#g')
286287
COMPONENT_SLUG="$STACK_NAME-$COMPONENT_NAME"
287288
COMPONENT_CACHE_KEY=$(basename "${{ fromJson(steps.atmos-settings.outputs.settings).component-path }}")
@@ -299,6 +300,7 @@ runs:
299300
echo "component_name=${COMPONENT_NAME}" >> $GITHUB_OUTPUT
300301
echo "component_slug=${COMPONENT_SLUG}" >> $GITHUB_OUTPUT
301302
echo "component_path=${COMPONENT_RELPATH}" >> $GITHUB_OUTPUT
303+
echo "component_cache_path=${COMPONENT_CACHE_PATH}" >> $GITHUB_OUTPUT
302304
echo "cache-key=${COMPONENT_CACHE_KEY}" >> $GITHUB_OUTPUT
303305
echo "plan_file=${PLAN_FILE}" >> $GITHUB_OUTPUT
304306
echo "plan_file_json=${PLAN_FILE_JSON}" >> $GITHUB_OUTPUT
@@ -314,7 +316,7 @@ runs:
314316
if: ${{ fromJson(steps.atmos-settings.outputs.settings).github-actions-enabled || fromJson(steps.atmos-settings.outputs.settings).atmos-pro-enabled }}
315317
with:
316318
path: |
317-
./${{ steps.vars.outputs.component_path }}/.terraform
319+
${{ steps.vars.outputs.component_cache_path }}/.terraform
318320
key: ${{ steps.vars.outputs.cache-key }}
319321

320322
- name: Atmos Terraform Plan

0 commit comments

Comments
 (0)