From 625dd2413b914aa183ceeb79234dcea4f850e238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=95=88=EC=84=B1=ED=9B=88?= Date: Wed, 8 Apr 2026 10:27:44 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20web=20repo=EC=9D=98=20ci=EB=A5=BC?= =?UTF-8?q?=20=EC=9C=84=ED=95=9C=20ci.yml=ED=8C=8C=EC=9D=BC=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=20#1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 93 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..67c24c7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,93 @@ +name: web-ci + +on: + push: + branches: + - '**' + pull_request: + branches: + - dev + - main + +concurrency: + group: web-ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + ci: + runs-on: ubuntu-latest + permissions: + contents: read + packages: read + outputs: + image_tag: ${{ steps.meta.outputs.image_tag }} + should_deploy: ${{ steps.meta.outputs.should_deploy }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'pnpm' + + - name: Enable Corepack + run: corepack enable + + - name: Install + run: pnpm install --frozen-lockfile + + - name: Test + run: pnpm test --if-present + + - name: Build + run: pnpm build + + - name: Set deploy metadata + id: meta + shell: bash + run: | + if [[ "${GITHUB_EVENT_NAME}" == "push" && "${GITHUB_REF_NAME}" == "main" ]]; then + echo "should_deploy=true" >> "$GITHUB_OUTPUT" + echo "image_tag=main-${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT" + else + echo "should_deploy=false" >> "$GITHUB_OUTPUT" + echo "image_tag=" >> "$GITHUB_OUTPUT" + fi + + - name: Set up Docker Buildx + if: steps.meta.outputs.should_deploy == 'true' + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + if: steps.meta.outputs.should_deploy == 'true' + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push image + if: steps.meta.outputs.should_deploy == 'true' + uses: docker/build-push-action@v6 + with: + context: . + file: ./Dockerfile + push: true + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/withrun-web:${{ steps.meta.outputs.image_tag }} + ${{ secrets.DOCKERHUB_USERNAME }}/withrun-web:main + + notify-infra: + if: needs.ci.outputs.should_deploy == 'true' + needs: ci + runs-on: ubuntu-latest + steps: + - name: Trigger infra deploy + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ secrets.INFRA_REPO_DISPATCH_TOKEN }} + repository: with-run/infra + event-type: deploy-web + client-payload: >- + {"service":"web","image":"${{ secrets.DOCKERHUB_USERNAME }}/withrun-web:${{ needs.ci.outputs.image_tag }}","sha":"${{ github.sha }}","source_repo":"${{ github.repository }}"} \ No newline at end of file From e758934c4ab702a2ef1952c35e93ebaa7ac970aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=95=88=EC=84=B1=ED=9B=88?= Date: Mon, 13 Apr 2026 10:46:40 +0900 Subject: [PATCH 2/3] =?UTF-8?q?ci:=20pnpm=20=EC=BA=90=EC=8B=9C=20=EC=9D=B4?= =?UTF-8?q?=EC=A0=84=EC=97=90=20pnpm=20=EC=84=A4=EC=B9=98=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95=20#1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67c24c7..2f89742 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,15 +26,17 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 10.27.0 + - name: Setup Node uses: actions/setup-node@v4 with: node-version: '20' cache: 'pnpm' - - name: Enable Corepack - run: corepack enable - - name: Install run: pnpm install --frozen-lockfile From 9143460faa6f3b4f1ccab804625a5d15b0c31f4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=95=88=EC=84=B1=ED=9B=88?= Date: Thu, 16 Apr 2026 16:04:40 +0900 Subject: [PATCH 3/3] =?UTF-8?q?chore:=20=EC=9B=B9=20Dockerfile=EC=97=90?= =?UTF-8?q?=EC=84=9C=20mobile=20bridge=20=EB=B3=B5=EC=82=AC=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index eb0abcf..21527ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,6 @@ WORKDIR /app RUN ln -s /app/web/node_modules /app/node_modules COPY web ./web -COPY mobile/src/bridge ./mobile/src/bridge WORKDIR /app/web ARG VITE_MODE=production