Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache Terraform plugins and modules #1487

Open
suzuki-shunsuke opened this issue Jan 29, 2024 · 1 comment
Open

Cache Terraform plugins and modules #1487

suzuki-shunsuke opened this issue Jan 29, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@suzuki-shunsuke
Copy link
Owner

suzuki-shunsuke commented Jan 29, 2024

Feature Overview

Cache Terraform plugins and modules

Why is the feature needed?

To speed up CI.

Example Code

No response

Note

@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Jan 29, 2024
@rochana-atapattu
Copy link
Contributor

I am using github/cache action to achieve this (I have not had time to thoroughly asses the impact).

- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
   with:
      save-always: true
      path: ~/.local/share/aquaproj-aqua
      key: test-modules-v1-aqua-installer-${{runner.os}}-${{runner.arch}}-${{hashFiles('**/aqua/**/*.yaml')}} # Change key
      restore-keys: |
          test-modules-v1-aqua-installer-${{runner.os}}-${{runner.arch}}-

and

- name: Cache Terraform
   uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4
     with:
       path: |
         ${{ steps.target-config.outputs.working_directory }}/.terraform/
       key: ${{ steps.working_directory_name.outputs.working_directory }}-${{ runner.os }}-terraform-${{ hashFiles('${{ steps.target-config.outputs.working_directory }}/.terraform.lock.hcl') }}
       restore-keys: |
         ${{ steps.working_directory_name.outputs.working_directory }}-${{ runner.os }}-terraform-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Status: No status
Development

No branches or pull requests

2 participants