From 421f626c5c8052d85e1a4b77c6d9a4332e6dbaee Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jul 2024 23:33:46 +0200 Subject: [PATCH] Test .terraform caching --- action.yml | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/action.yml b/action.yml index 0c8b636d..cbc9073c 100644 --- a/action.yml +++ b/action.yml @@ -197,9 +197,9 @@ runs: role-session-name: "atmos-terraform-plan-gitops" mask-aws-account-id: "no" - - name: Restore .terraform from cache + - name: Cache .terraform id: cache-restore - uses: actions/cache/restore@v4 + uses: actions/cache@v4 if: ${{ steps.atmos-github-actions-enabled.outputs.value == 'true' }} with: path: | @@ -282,33 +282,6 @@ runs: rm -f ${TERRAFORM_OUTPUT_FILE} - - name: Install gh - if: ${{ steps.atmos-github-actions-enabled.outputs.value == 'true' }} - uses: jaxxstorm/action-install-gh-release@v1.11.0 - with: - repo: cli/cli - tag: v2.53.0 - - - name: clear - if: ${{ steps.atmos-github-actions-enabled.outputs.value == 'true' && steps.cache-restore.outputs.cache-hit }} - shell: bash - env: - GH_TOKEN: ${{ github.token }} - run: | - gh extension install actions/gh-actions-cache - gh actions-cache delete ${{ steps.cache-restore.outputs.cache-primary-key }} --confirm - continue-on-error: true - - - name: Cache .terraform - id: cache-save - uses: actions/cache/save@v4 - if: ${{ steps.atmos-github-actions-enabled.outputs.value == 'true' }} - with: - path: | - ./${{ steps.vars.outputs.component_path }}/.terraform/modules - ./${{ steps.vars.outputs.component_path }}/.terraform/providers - key: ${{ steps.cache-restore.outputs.cache-primary-key }} - - name: Configure State AWS Credentials if: ${{ steps.atmos-plan.outputs.error == 'false' }} uses: aws-actions/configure-aws-credentials@v4.0.2