From f5272ddccb1a7171ab2d95e5aa480e2dc087944c Mon Sep 17 00:00:00 2001 From: Nicolas Bouliol Date: Thu, 19 Dec 2024 09:41:28 +0100 Subject: [PATCH] ci: use v4 actions (#1232) --- .github/workflows/build.yml | 40 ++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cfba4b4565..d8334f5ff3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,11 +23,11 @@ jobs: steps: - name: Cancel previous running workflows uses: fkirc/skip-duplicate-actions@master - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18.14.0 - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | node_modules @@ -37,7 +37,7 @@ jobs: run: yarn && yarn bootstrap --ci - name: Build run: yarn build - - uses: actions/cache/save@v3 + - uses: actions/cache/save@v4 with: path: packages/*/dist key: ${{ runner.os }}-build-${{ github.sha }} @@ -47,7 +47,7 @@ jobs: runs-on: ubuntu-latest needs: [build] steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Lint commit message @@ -76,15 +76,15 @@ jobs: - plugin-export-advanced - plugin-flattener steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18.14.0 - name: Start docker containers if: ${{ matrix.package == 'datasource-mongo' || matrix.package == 'datasource-mongoose' || matrix.package == 'datasource-sql' || matrix.package == 'datasource-sequelize' }} run: docker compose -f ./packages/${{ matrix.package }}/docker-compose.yml up -d; sleep 5 - name: Restore dependencies from cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: path: | node_modules @@ -92,7 +92,7 @@ jobs: key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}-${{ hashFiles('packages/*/package.json') }} fail-on-cache-miss: true - name: Restore build from cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: path: packages/*/dist key: ${{ runner.os }}-build-${{ github.sha }} @@ -102,7 +102,7 @@ jobs: - name: Test code run: cd packages/${{ matrix.package }} && yarn test --coverage && cd - - name: Upload coverage - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ matrix.package }} path: packages/${{ matrix.package }}/coverage/clover.xml @@ -114,9 +114,9 @@ jobs: timeout-minutes: 10 needs: [test] steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + - uses: actions/checkout@v4 - name: Download coverage reports - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: path: reports - name: Send coverage @@ -132,12 +132,12 @@ jobs: runs-on: ubuntu-latest needs: [build] steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18.14.0 - name: Restore dependencies from cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: path: | node_modules @@ -145,7 +145,7 @@ jobs: key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}-${{ hashFiles('packages/*/package.json') }} fail-on-cache-miss: true - name: Restore build from cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: path: packages/*/dist key: ${{ runner.os }}-build-${{ github.sha }} @@ -171,15 +171,15 @@ jobs: || startsWith(github.ref, 'refs/heads/beta-') ) steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + - uses: actions/checkout@v4 with: fetch-depth: 0 persist-credentials: false # GITHUB_TOKEN must not be set for the semantic release - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 18.14.0 - name: Restore dependencies from cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: path: | node_modules @@ -187,7 +187,7 @@ jobs: key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}-${{ hashFiles('packages/*/package.json') }} fail-on-cache-miss: true - name: Restore build from cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: path: packages/*/dist key: ${{ runner.os }}-build-${{ github.sha }}