feat: add caching for pnpm store and Terraform providers
All checks were successful
validate-shared-actions / validate-shared-actions (pull_request) Successful in 44s
Aikido Security PR Check / Aikido Security Scan (pull_request) Successful in 56s

This commit is contained in:
Michael.Seele@schmalz.de 2026-05-05 13:06:35 +00:00
parent dd41de5246
commit 4030dee789
3 changed files with 38 additions and 0 deletions

View file

@ -49,6 +49,18 @@ runs:
with:
version: ${{ inputs.pnpm-version }}
- name: Get pnpm store directory
id: pnpm-store
shell: bash
run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
- name: Cache pnpm store
uses: https://schmalz-git.git.onstackit.cloud/schmalz/shared-actions/cache@cache-v1
with:
path: ${{ steps.pnpm-store.outputs.path }}
key: ${{ runner.os }}-pnpm-${{ inputs.pnpm-version }}-${{ hashFiles(format('{0}/pnpm-lock.yaml', inputs.working-directory)) }}
restore-keys: ${{ runner.os }}-pnpm-${{ inputs.pnpm-version }}-
- name: Configure pnpm registry authentication
if: ${{ inputs.jfrog-token != '' }}
shell: bash

View file

@ -34,6 +34,19 @@ runs:
with:
terraform_version: ${{ inputs.terraform-version }}
- name: Set Terraform plugin cache directory
shell: bash
run: |
mkdir -p ~/.terraform.d/plugin-cache
echo "TF_PLUGIN_CACHE_DIR=$HOME/.terraform.d/plugin-cache" >> "$GITHUB_ENV"
- name: Cache Terraform providers
uses: https://schmalz-git.git.onstackit.cloud/schmalz/shared-actions/cache@cache-v1
with:
path: ~/.terraform.d/plugin-cache
key: ${{ runner.os }}-terraform-providers-${{ inputs.terraform-version }}-${{ hashFiles(format('{0}/.terraform.lock.hcl', inputs.terraform-dir)) }}
restore-keys: ${{ runner.os }}-terraform-providers-${{ inputs.terraform-version }}-
- name: Terraform Init
shell: bash
env:

View file

@ -30,6 +30,19 @@ runs:
with:
terraform_version: ${{ inputs.terraform-version }}
- name: Set Terraform plugin cache directory
shell: bash
run: |
mkdir -p ~/.terraform.d/plugin-cache
echo "TF_PLUGIN_CACHE_DIR=$HOME/.terraform.d/plugin-cache" >> "$GITHUB_ENV"
- name: Cache Terraform providers
uses: https://schmalz-git.git.onstackit.cloud/schmalz/shared-actions/cache@cache-v1
with:
path: ~/.terraform.d/plugin-cache
key: ${{ runner.os }}-terraform-providers-${{ inputs.terraform-version }}-${{ hashFiles(format('{0}/.terraform.lock.hcl', inputs.terraform-dir)) }}
restore-keys: ${{ runner.os }}-terraform-providers-${{ inputs.terraform-version }}-
- name: Terraform Init
shell: bash
env: