From 1cbb6be30f113e6dcb594d5cdf0b322c1c78fefc Mon Sep 17 00:00:00 2001 From: "Soare Robert Daniel (Mac 2023)" Date: Wed, 16 Oct 2024 10:03:12 +0300 Subject: [PATCH] chore: use build-in action cache --- .github/workflows/create-build-zip.yml | 4 ++++ .github/workflows/create-tag.yml | 13 ++----------- .github/workflows/deploy-s3-store.yml | 3 ++- .github/workflows/e2e.yml | 1 + 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/create-build-zip.yml b/.github/workflows/create-build-zip.yml index 410afbcf..c94d80b9 100644 --- a/.github/workflows/create-build-zip.yml +++ b/.github/workflows/create-build-zip.yml @@ -19,6 +19,10 @@ jobs: steps: - name: Check out source files uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "18" + cache: "yarn" - name: Install composer deps run: composer install --no-dev --prefer-dist --no-progress --no-suggest - name: Install yarn deps diff --git a/.github/workflows/create-tag.yml b/.github/workflows/create-tag.yml index b764a99f..22a2fdb4 100644 --- a/.github/workflows/create-tag.yml +++ b/.github/workflows/create-tag.yml @@ -16,19 +16,10 @@ jobs: with: persist-credentials: false - name: Build files using ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 - id: yarn-cache - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + cache: "yarn" - name: Release new version id: release run: | diff --git a/.github/workflows/deploy-s3-store.yml b/.github/workflows/deploy-s3-store.yml index 81dec438..19f6e879 100644 --- a/.github/workflows/deploy-s3-store.yml +++ b/.github/workflows/deploy-s3-store.yml @@ -11,9 +11,10 @@ jobs: steps: - uses: actions/checkout@master - name: Setup node 18 - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: 18.x + cache: "yarn" - name: Build & create dist/artifact run: | yarn install --frozen-lockfile diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index ca8534db..53e97a17 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -18,6 +18,7 @@ jobs: - uses: actions/setup-node@v4 with: node-version: "18" + cache: "yarn" - name: Install NPM deps run: | yarn install --frozen-lockfile