Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub Actions for CI and CD #84

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/continuous-delivery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ on:
# Only trigger on semver shaped tags.
- "v*.*.*"
paths-ignore:
- '.github/**'
- 'docs/**'
- 'scripts/**'
- '**.md'
- '.gitignore'
- 'LICENSE'
- 'CODEOWNERS'
- ".github/**"
- "docs/**"
- "scripts/**"
- "**.md"
- ".gitignore"
- "LICENSE"
- "CODEOWNERS"
# - '.all-contributorsrc'
# - 'assets/**'
# - 'src/testclient/scripts/**'
# workflow trigger button
# workflow trigger button
# workflow_dispatch:

env:
Expand All @@ -42,7 +42,7 @@ jobs:
# Job name is "Publish a container image"
name: Publish a container image

if: github.repository == 'cloud-barista/cm-beetle'
if: github.repository_owner == 'cloud-barista'

# 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
Expand Down
42 changes: 21 additions & 21 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ on:
branches:
- main
paths-ignore:
- '**.md'
- '.all-contributorsrc'
- '.gitignore'
- 'LICENSE'
- 'CODEOWNERS'
- 'assets/**'
- 'scripts/**'
- 'src/testclient/scripts/**'
- 'docs/**'
- "**.md"
- ".all-contributorsrc"
- ".gitignore"
- "LICENSE"
- "CODEOWNERS"
- "assets/**"
- "scripts/**"
- "src/testclient/scripts/**"
- "docs/**"

jobs:
# The job key (i.e., ID) is "build-source-code"
Expand All @@ -26,24 +26,24 @@ jobs:
# See https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
name: Build source code
strategy:
matrix:
matrix:
go-version: ["1.21"]
os: [ubuntu-22.04]
#os: [ubuntu-22.04, ubuntu-20.04, windows-2022, windows-2019]
#os: [ubuntu-22.04, ubuntu-20.04, windows-2022, windows-2019]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

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

- name: Build
run: go build -v ./...
- name: Build
run: make # cd cmd/cm-beetle && go build -v -o cm-beetle

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

# The job key is "build-container-image"
build-container-image:
Expand All @@ -59,7 +59,7 @@ jobs:
- name: Checkout source code
uses: actions/checkout@v4

- name: Build
- name: Build
env:
IMAGE_NAME: ${{ github.event.repository.name }}
run: docker build . --file Dockerfile --tag $IMAGE_NAME
2 changes: 1 addition & 1 deletion cmd/cm-beetle/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default:
go build -o cm-beetle
go build -v -o cm-beetle
cc:
GOOS=linux GOARCH=arm go build -o cm-beetle-arm
run:
Expand Down