From 65ace2e930623bf5fb21d6445efe2f3c7bf4ebcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EB=8C=80=EC=9C=A4?= Date: Mon, 5 Feb 2024 01:55:14 +0900 Subject: [PATCH] ci: update action to latest --- .github/workflows/CI.yml | 83 ++++++++++++++++++++++++++-------------- 1 file changed, 54 insertions(+), 29 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index da256342..f8d45ebf 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -17,16 +17,19 @@ jobs: YARN_ENABLE_IMMUTABLE_INSTALLS: false steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - - name: Caching dependencies - uses: actions/cache@v1 + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT + + - uses: actions/cache@v3 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: - path: node_modules - key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | - ${{ runner.OS }}-build- - ${{ runner.OS }}- + ${{ runner.os }}-yarn- - name: Install dependencies run: yarn @@ -48,16 +51,20 @@ jobs: YARN_ENABLE_IMMUTABLE_INSTALLS: false steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 + + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - - name: Caching dependencies - uses: actions/cache@v1 + - uses: actions/cache@v3 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: - path: node_modules - key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | - ${{ runner.OS }}-build- - ${{ runner.OS }}- + ${{ runner.os }}-yarn- + - name: Install dependencies run: yarn @@ -70,16 +77,19 @@ jobs: YARN_ENABLE_IMMUTABLE_INSTALLS: false steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - - name: Caching dependencies - uses: actions/cache@v1 + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT + + - uses: actions/cache@v3 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: - path: node_modules - key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | - ${{ runner.OS }}-build- - ${{ runner.OS }}- + ${{ runner.os }}-yarn- - name: Install dependencies run: yarn @@ -93,16 +103,19 @@ jobs: YARN_ENABLE_IMMUTABLE_INSTALLS: false steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 + + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - - name: Caching dependencies - uses: actions/cache@v1 + - uses: actions/cache@v3 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: - path: node_modules - key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | - ${{ runner.OS }}-build- - ${{ runner.OS }}- + ${{ runner.os }}-yarn- - name: Install dependencies run: yarn @@ -122,7 +135,19 @@ jobs: YARN_ENABLE_IMMUTABLE_INSTALLS: false steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 + + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT + + - uses: actions/cache@v3 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- - name: Install dependencies run: yarn