Skip to content

Commit

Permalink
Merge pull request #16 from yunkon-kim/240702-22
Browse files Browse the repository at this point in the history
Add CI workflow
  • Loading branch information
MZC-CSC authored Jul 4, 2024
2 parents 859ac7e + 40b66d2 commit 1ffd9b9
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 1 deletion.
65 changes: 65 additions & 0 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# This workflow performs continuous integration (CI).
# This workflow will build the container image for amd64 arch. (as a basic build test)
name: Continuous Integration (CI)

on:
# On pull-request event with detailed condition below.
pull_request:
branches:
- main
paths-ignore:
- "**.md"
- ".gitignore"
- "LICENSE"
- "CODEOWNERS"
- "assets/**"
- "docs/**"
# - "scripts/**"
# - ".all-contributorsrc"
# - "src/testclient/scripts/**"

jobs:
# The job key (i.e., ID) is "build-source-code"
build-source-code:
# Job name is "Building source code"
# This job runs on Ubuntu-latest (Ubuntu 22.04 LTS checked on 2023-12-13)
# See https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
name: Build source code
strategy:
matrix:
go-version: ["1.21"]
os: [ubuntu-22.04]
#os: [ubuntu-22.04, ubuntu-20.04, windows-2022, windows-2019]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{matrix.go-version}}

- name: Build
run: make

# - name: Test
# run: go test -v ./...

# # The job key is "build-container-image"
# build-container-image:
# # Job name is "Build a container image"
# name: Build a container image

# # This job runs on Ubuntu-latest (Ubuntu 22.04 LTS checked on 2023-12-13)
# # See https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
# runs-on: ubuntu-22.04
# if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}

# steps:
# - name: Checkout source code
# uses: actions/checkout@v4

# - name: Build image
# env:
# IMAGE_NAME: ${{ github.event.repository.name }}
# run: docker build . --file Dockerfile --tag $IMAGE_NAME
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# ./mayfly rest get -u default -p default http://cb-spider:1024/spider/readyz

# 베이스 이미지 선택
FROM ubuntu:latest
FROM ubuntu:latest as prod

# 컨테이너 내의 작업 디렉토리 설정(RUN / CMD / ENTRYPOINT 명령이 실행될 기본 경로)
WORKDIR /app
Expand Down

0 comments on commit 1ffd9b9

Please sign in to comment.