Skip to content

Commit

Permalink
Change cache
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentaTomas committed Oct 15, 2023
1 parent dd318d8 commit ca254ba
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ on:
client_machine_type:
required: true

env:
TF_PLUGIN_CACHE_DIR: ${{ github.workspace }}/.terraform.d/plugin-cache

jobs:
deploy:
name: Deploy
Expand All @@ -36,19 +39,14 @@ jobs:
with:
terraform_version: 1.1.9

- name: Config Terraform plugin cache
run: |
echo 'plugin_cache_dir="$HOME/.terraform.d/plugin-cache"' >~/.terraformrc
mkdir --parents ~/.terraform.d/plugin-cache
- name: Create Terraform Plugin Cache Dir
run: mkdir --parents $TF_PLUGIN_CACHE_DIR

- name: Cache Terraform
uses: actions/cache@v3
with:
path: |
~/.terraform.d/plugin-cache
path: ${{ env.TF_PLUGIN_CACHE_DIR }}
key: ${{ runner.os }}-terraform-${{ hashFiles('**/.terraform.lock.hcl') }}
restore-keys: |
${{ runner.os }}-terraform-

- name: Init Terraform
run: make init
Expand All @@ -57,7 +55,7 @@ jobs:
run: make apply
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CLIENT_CLUSTER_SIZE: ${{ secrets.client_cluster_size }}
CLIENT_MACHINE_TYPE: ${{ secrets.client_machine_type }}
SERVER_CLUSTER_SIZE: ${{ secrets.server_cluster_size }}
CLIENT_CLUSTER_SIZE: ${{ secrets.client_cluster_size }}
SERVER_MACHINE_TYPE: ${{ secrets.server_machine_type }}
SERVER_CLUSTER_SIZE: ${{ secrets.server_cluster_size }}

0 comments on commit ca254ba

Please sign in to comment.