Skip to content

Commit

Permalink
Migrate to buf build (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 authored Mar 22, 2023
1 parent 58fd4e5 commit c61ce22
Show file tree
Hide file tree
Showing 19 changed files with 425 additions and 357 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install libsystemd headers
run: sudo apt-get update && sudo apt-get install libsystemd-dev

- name: Lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
args: -p bugs -p unused --timeout=3m

- name: Docker Login
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: ${{ secrets.DOCKER_REGISTRY }}
username: ${{ secrets.DOCKER_REGISTRY_USER }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Figure out if running fork PR
id: fork
run: '["${{ secrets.DOCKER_REGISTRY_TOKEN }}" == ""] && echo "::set-output name=is_fork_pr::true" || echo "::set-output name=is_fork_pr::false"'

- name: Docker Login
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: ${{ secrets.DOCKER_REGISTRY }}
username: ${{ secrets.DOCKER_REGISTRY_USER }}
Expand All @@ -27,12 +27,12 @@ jobs:
run: sudo apt-get update && sudo apt-get install libsystemd-dev

- name: Lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
args: -p bugs -p unused --timeout=3m

- name: Docker Login
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: ${{ secrets.DOCKER_REGISTRY }}
username: ${{ secrets.DOCKER_REGISTRY_USER }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install libsystemd headers
run: sudo apt-get update && sudo apt-get install libsystemd-dev

- name: Lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
args: -p bugs -p unused --timeout=3m

- name: Docker Login
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: ${{ secrets.DOCKER_REGISTRY }}
username: ${{ secrets.DOCKER_REGISTRY_USER }}
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM golang:1.19-buster as builder
FROM golang:1.20-buster as builder
COPY / /work
WORKDIR /work
RUN make server

FROM alpine:3.16
FROM alpine:3.17
COPY --from=builder /work/bin/server /server
ENV SERVER_PORT=50051
EXPOSE ${SERVER_PORT}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.client
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19-buster as builder
FROM golang:1.20-buster as builder
COPY / /work
WORKDIR /work
RUN apt-get update \
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ DOCKER_TAG := $(or ${GITHUB_TAG_NAME}, latest)

.PHONY: proto
proto:
docker pull metalstack/builder
docker run -it --rm --user $$(id -u):$$(id -g) -v ${PWD}/proto:/work/proto metalstack/builder protoc -I proto/ proto/droptailer.proto --go_out=plugins=grpc:proto
make -C proto protoc

.PHONY: server
server:
Expand Down
229 changes: 229 additions & 0 deletions api/proto/droptailer.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c61ce22

Please sign in to comment.