3
.dockerignore
Normal file
3
.dockerignore
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
.git
|
||||||
|
bin/
|
||||||
|
tmp/
|
||||||
21
.github/workflows/make.yaml
vendored
21
.github/workflows/make.yaml
vendored
@@ -8,13 +8,28 @@ on:
|
|||||||
- "main"
|
- "main"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
docker-build:
|
||||||
name: "build"
|
name: "docker-build"
|
||||||
|
runs-on: "ubuntu-22:04"
|
||||||
|
steps:
|
||||||
|
- uses: "actions/checkout@v4"
|
||||||
|
- uses: "docker/setup-qemu-action@v2"
|
||||||
|
- uses: "docker/setup-buildx-action@v2"
|
||||||
|
- uses: "docker/login-action@v2"
|
||||||
|
with:
|
||||||
|
registry: "ghcr.io"
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- run: "make docker-build"
|
||||||
|
env:
|
||||||
|
DOCKER_BUILD_FLAGS: "--platform linux/amd64,linux/arm64 --push"
|
||||||
|
bin/probod:
|
||||||
|
name: "bin/probod"
|
||||||
runs-on: "ubuntu-22.04"
|
runs-on: "ubuntu-22.04"
|
||||||
steps:
|
steps:
|
||||||
- uses: "actions/checkout@v4"
|
- uses: "actions/checkout@v4"
|
||||||
- uses: "actions/setup-node@v4"
|
- uses: "actions/setup-node@v4"
|
||||||
- run: "make build"
|
- run: "make bin/probod"
|
||||||
fmt-check:
|
fmt-check:
|
||||||
name: "fmt-check"
|
name: "fmt-check"
|
||||||
runs-on: "ubuntu-22.04"
|
runs-on: "ubuntu-22.04"
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
|
|||||||
make bin/probod
|
make bin/probod
|
||||||
|
|
||||||
FROM ubuntu:22.04
|
FROM ubuntu:22.04
|
||||||
|
LABEL org.opencontainers.image.source="https://github.com/getprobo/probo"
|
||||||
|
LABEL org.opencontainers.image.licenses="MIT"
|
||||||
|
LABEL org.opencontainers.image.vendor="Probo Inc"
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN useradd -m probo && \
|
RUN useradd -m probo && \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
|
|||||||
14
GNUmakefile
14
GNUmakefile
@@ -3,6 +3,9 @@ PRETTIER?= $(NPX) prettier
|
|||||||
GO?= go
|
GO?= go
|
||||||
DOCKER?= docker
|
DOCKER?= docker
|
||||||
|
|
||||||
|
DOCKER_BUILD_FLAGS?=
|
||||||
|
DOCKER_BUILD= DOCKER_BUILDKIT=1 $(DOCKER) build $(DOCKER_BUILD_FLAGS)
|
||||||
|
|
||||||
DOCKER_COMPOSE= $(DOCKER) compose -f compose.yaml $(DOCKER_COMPOSE_FLAGS)
|
DOCKER_COMPOSE= $(DOCKER) compose -f compose.yaml $(DOCKER_COMPOSE_FLAGS)
|
||||||
|
|
||||||
VERSION= unknown
|
VERSION= unknown
|
||||||
@@ -14,6 +17,9 @@ GO_GENERATE= $(GO) generate
|
|||||||
|
|
||||||
CONTROL_SRC:= $(shell find ./controls -type f -name "*.md")
|
CONTROL_SRC:= $(shell find ./controls -type f -name "*.md")
|
||||||
|
|
||||||
|
DOCKER_IMAGE_NAME= ghcr.io/getprobo/probo
|
||||||
|
DOCKER_TAG_NAME?= latest
|
||||||
|
|
||||||
PROBOD_BIN= bin/probod
|
PROBOD_BIN= bin/probod
|
||||||
PROBOD_SRC= cmd/probod/main.go
|
PROBOD_SRC= cmd/probod/main.go
|
||||||
|
|
||||||
@@ -28,10 +34,14 @@ vet:
|
|||||||
$(GO) vet ./...
|
$(GO) vet ./...
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: vet bin/probod
|
build: bin/probod docker-build
|
||||||
|
|
||||||
|
.PHONY: docker-build
|
||||||
|
docker-build:
|
||||||
|
$(DOCKER_BUILD) --tag $(DOCKER_IMAGE_NAME):$(DOCKER_TAG_NAME) --file Dockerfile .
|
||||||
|
|
||||||
.PHONY: bin/probod
|
.PHONY: bin/probod
|
||||||
bin/probod: pkg/api/console/v1/schema/schema.go pkg/api/console/v1/types/types.go pkg/api/console/v1/v1_resolver.go
|
bin/probod: pkg/api/console/v1/schema/schema.go pkg/api/console/v1/types/types.go pkg/api/console/v1/v1_resolver.go vet
|
||||||
$(GO_BUILD) -o $(PROBOD_BIN) $(PROBOD_SRC)
|
$(GO_BUILD) -o $(PROBOD_BIN) $(PROBOD_SRC)
|
||||||
|
|
||||||
pkg/api/console/v1/schema/schema.go \
|
pkg/api/console/v1/schema/schema.go \
|
||||||
|
|||||||
Reference in New Issue
Block a user