Skip to content

Commit

Permalink
feat: build action
Browse files Browse the repository at this point in the history
  • Loading branch information
tithanayut committed Feb 2, 2025
1 parent face4ff commit 411b581
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build

on:
workflow_dispatch:
inputs:
APP_DIR:
description: "Directory of the service to build"
required: true
type: string

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to the Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push Docker Image
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/Dockerfile
push: true
tags: ghcr.io/noah-platform/noah/${{ github.event.inputs.APP_DIR }}:latest
build-args: |
APP_DIR=${{ github.event.inputs.APP_DIR }}
cache-from: type=gha
cache-to: type=gha,mode=max
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (s *Server) InternalGetAccountByGoogleAccountID(c echo.Context) error {

l.Info().Msg("[Server.InternalGetAccountByGoogleAccountID] get account successfully")

return response.Data(c, GetAccountByGoogleAccountIDResponse{
return response.Ok(c, GetAccountByGoogleAccountIDResponse{
ID: account.ID,
Email: account.Email,
Name: account.Name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (s *Server) InternalRegisterAccountByGoogleAccount(c echo.Context) error {

l.Info().Msg("[Server.InternalRegisterAccountByGoogleAccount] account registered")

return response.Data(c, RegisterAccountByGoogleAccountResponse{
return response.Ok(c, RegisterAccountByGoogleAccountResponse{
ID: account.ID,
Email: account.Email,
Name: account.Name,
Expand Down

0 comments on commit 411b581

Please sign in to comment.