diff --git a/action.yml b/action.yml index c915f113a..4c4ed9ccc 100644 --- a/action.yml +++ b/action.yml @@ -309,6 +309,8 @@ runs: NO_BACKEND: ${{ inputs.no-backend }} DEBUG: 'true' TF_PLUGIN_CACHE_DIR: ${{ github.workspace }}/cache + TERRAGRUNT_PROVIDER_CACHE: ${{ inputs.cache-dependencies == 'true' && "1" || "0" }} + TERRAGRUNT_PROVIDER_CACHE_DIR: ${{ github.workspace }}/cache run: | cd $GITHUB_ACTION_PATH/cli go build -o digger ./cmd/digger @@ -336,6 +338,9 @@ runs: INPUT_DIGGER_COMMAND: ${{ inputs.command }} INPUT_DRIFT_DETECTION_SLACK_NOTIFICATION_URL: ${{ inputs.drift-detection-slack-notification-url }} NO_BACKEND: ${{ inputs.no-backend }} + TF_PLUGIN_CACHE_DIR: ${{ github.workspace }}/cache + TERRAGRUNT_PROVIDER_CACHE: ${{ inputs.cache-dependencies == 'true' && "1" || "0" }} + TERRAGRUNT_PROVIDER_CACHE_DIR: ${{ github.workspace }}/cache id: digger shell: bash run: | @@ -347,10 +352,12 @@ runs: - uses: actions/cache/save@v4 name: cache-save + if: ${{ inputs.cache-dependencies == 'true' }} with: path: ${{ github.workspace }}/cache key: digger-cache-${{ hashFiles('**/cache') }} - if: ${{ inputs.cache-dependencies == 'true' }} + restore-keys: | + digger-cache- branding: icon: globe