From eca741a7f442d807cac8470457b8003380d5d354 Mon Sep 17 00:00:00 2001 From: AnnatarHe Date: Sat, 3 Aug 2024 11:35:54 +0800 Subject: [PATCH 1/3] fix(ci): fix ci --- .github/workflows/node.js.yml | 9 +++++++++ Dockerfile | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 291e4858..37d59591 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -38,6 +38,15 @@ jobs: - run: pnpm run build # to make sure this version can be build env: GIT_COMMIT: ${{ github.sha }} + - name: Build and push + uses: docker/build-push-action@v6 + env: + GIT_COMMIT: ${{ github.sha }} + with: + push: false + build-args: GIT_COMMIT=${{ github.sha }} + tags: tests + labels: tests - run: pnpm run coveralls env: COVERALLS_REPO_TOKEN: ${{ secrets.CODEALLS_REPO_TOKEN }} diff --git a/Dockerfile b/Dockerfile index 961064fd..34b85482 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ RUN apk add --no-cache libc6-compat g++ make py3-pip WORKDIR /app # Install dependencies based on the preferred package manager -COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* src/types.g.ts ./ +COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./src/types.g.ts ./ RUN corepack enable pnpm && pnpm i --frozen-lockfile FROM base AS builder From 30258f597d87f5af910cd737d81616039031680b Mon Sep 17 00:00:00 2001 From: AnnatarHe Date: Sat, 3 Aug 2024 11:43:48 +0800 Subject: [PATCH 2/3] fix(ci): use current context for build --- .github/workflows/docker.yml | 1 + .github/workflows/node.js.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index da4c6aee..86bed7ed 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -59,6 +59,7 @@ jobs: env: GIT_COMMIT: ${{ github.sha }} with: + context: . push: true build-args: GIT_COMMIT=${{ github.sha }} tags: ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 37d59591..23fced9f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -43,6 +43,7 @@ jobs: env: GIT_COMMIT: ${{ github.sha }} with: + context: . push: false build-args: GIT_COMMIT=${{ github.sha }} tags: tests From c53e34ac043251c78b31b04cad022a8150e1535d Mon Sep 17 00:00:00 2001 From: AnnatarHe Date: Sat, 3 Aug 2024 11:47:50 +0800 Subject: [PATCH 3/3] fix(ci): fix ci step name --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 23fced9f..75ef2a1e 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -38,7 +38,7 @@ jobs: - run: pnpm run build # to make sure this version can be build env: GIT_COMMIT: ${{ github.sha }} - - name: Build and push + - name: docker build uses: docker/build-push-action@v6 env: GIT_COMMIT: ${{ github.sha }}