Skip to content

Commit

Permalink
Add: go build (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
ifooth committed Aug 10, 2023
1 parent a3ce9aa commit ece57e4
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Go

on:
push:
branches: [master, develop]
pull_request:
branches: [master, develop]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20.7

- name: Build
run: make build

- name: Test
run: make test

- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54.0
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,13 @@ build_initContainer:
build_sidecar:
${GOBUILD} -ldflags ${LDVersionFLAG} -o build/sidecar/bscp cli/main.go
cd build/sidecar && docker build . -t bscp-sidecar

.PHONY: build
build:
${GOBUILD} -ldflags ${LDVersionFLAG} -o build/initContainer/bscp cli/main.go
${GOBUILD} -ldflags ${LDVersionFLAG} -o build/sidecar/bscp cli/main.go

.PHONY: test
test:
go test ./...

0 comments on commit ece57e4

Please sign in to comment.