From 48786af865d349cce7667d6c8da6d0ec25668fdf Mon Sep 17 00:00:00 2001 From: "Ali(Ako) Hosseini" Date: Mon, 6 Nov 2023 15:54:36 +0800 Subject: [PATCH] ci: use setup node action instead of container image --- .github/workflows/release_production.yml | 20 ++++++++++++++------ .github/workflows/release_staging.yml | 12 ++++++++---- .github/workflows/test.yml | 6 ++++-- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release_production.yml b/.github/workflows/release_production.yml index 9c46db806e4..1e353358317 100644 --- a/.github/workflows/release_production.yml +++ b/.github/workflows/release_production.yml @@ -6,11 +6,13 @@ on: jobs: build_and_test: runs-on: ubuntu-latest - container: - image: node:12.22.7 steps: - name: Checkout uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 12.22 - name: Install dependencies uses: "./.github/actions/npm_install" - name: Build @@ -29,12 +31,15 @@ jobs: path: dist publish_cloudflare_production: runs-on: ubuntu-latest - container: - image: node:20.2.0 + needs: [build_and_test] steps: - name: Checkout uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 20.x - name: Download Artifacts uses: actions/download-artifact@v3.0.2 with: @@ -44,12 +49,15 @@ jobs: notify_on_slack: if: always() runs-on: ubuntu-latest - container: - image: node:20.2.0 + needs: [publish_cloudflare_production, build_and_test] steps: - name: Checkout uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 20.x - name: Conclusion uses: technote-space/workflow-conclusion-action@v3 - uses: actions/download-artifact@v3.0.2 diff --git a/.github/workflows/release_staging.yml b/.github/workflows/release_staging.yml index dca03ad82bc..bf7525173c8 100644 --- a/.github/workflows/release_staging.yml +++ b/.github/workflows/release_staging.yml @@ -6,11 +6,13 @@ on: jobs: build_and_test: runs-on: ubuntu-latest - container: - image: node:12.22.7 steps: - name: Checkout uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 12.22 - name: Install dependencies uses: "./.github/actions/npm_install" - name: Build @@ -28,12 +30,14 @@ jobs: path: dist publish_cloudflare_production: runs-on: ubuntu-latest - container: - image: node:20.2.0 needs: [build_and_test] steps: - name: Checkout uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 20.x - uses: actions/download-artifact@v3.0.2 with: path: dist diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0addc1785cf..ac632fbfd5b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,11 +6,13 @@ on: jobs: build_and_test: runs-on: ubuntu-latest - container: - image: node:12.22.7 steps: - name: Checkout uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 12.22 - name: Install dependencies uses: "./.github/actions/npm_install" - name: Build