From a01e369bbda886fb646b1213e905113de7645188 Mon Sep 17 00:00:00 2001 From: boomchanotai Date: Mon, 10 Nov 2025 22:15:46 +0700 Subject: [PATCH 1/4] build: add ci cd --- .github/workflows/build.yaml | 52 ++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..842aa5b --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,52 @@ +name: Build & Push All Services + +on: + push: + branches: + - main + workflow_dispatch: + +env: + REGISTRY: docker.io + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + service: + [ + auth, + event, + gateway, + location, + notification, + payment, + realtime, + reservation, + ] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ env.DOCKERHUB_USERNAME }} + password: ${{ env.DOCKERHUB_TOKEN }} + + - name: Build and Push ${{ matrix.service }} service + uses: docker/build-push-action@v6 + with: + context: ./services/${{ matrix.service }} + file: ./services/${{ matrix.service }}/Dockerfile + push: true + tags: | + ${{ env.REGISTRY }}/${{ env.DOCKERHUB_USERNAME }}/${{ matrix.service }}-service:latest + ${{ env.REGISTRY }}/${{ env.DOCKERHUB_USERNAME }}/${{ matrix.service }}-service:${{ github.sha }} From 94281a5eb3dfb540f045edd1a3443425f1c67ba0 Mon Sep 17 00:00:00 2001 From: boomchanotai Date: Mon, 10 Nov 2025 22:16:17 +0700 Subject: [PATCH 2/4] fix: ci --- .github/workflows/build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 842aa5b..284b266 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,6 +4,7 @@ on: push: branches: - main + - feat/build-ci-cd workflow_dispatch: env: From 0ec6b4f6c21dd96007bf414201160d4a1b13ba56 Mon Sep 17 00:00:00 2001 From: boomchanotai Date: Mon, 10 Nov 2025 22:19:51 +0700 Subject: [PATCH 3/4] fix: name --- services/realtime/{Dockferfile => Dockerfile} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename services/realtime/{Dockferfile => Dockerfile} (100%) diff --git a/services/realtime/Dockferfile b/services/realtime/Dockerfile similarity index 100% rename from services/realtime/Dockferfile rename to services/realtime/Dockerfile From 7cdf61efe39c8ccda4d1420dfe9a3e2eea3f9d93 Mon Sep 17 00:00:00 2001 From: boomchanotai Date: Mon, 10 Nov 2025 22:23:20 +0700 Subject: [PATCH 4/4] fix: pipeline --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 284b266..f4d3906 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -45,7 +45,7 @@ jobs: - name: Build and Push ${{ matrix.service }} service uses: docker/build-push-action@v6 with: - context: ./services/${{ matrix.service }} + context: . file: ./services/${{ matrix.service }}/Dockerfile push: true tags: |