Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Shkuro <github@ysh.us>
  • Loading branch information
yurishkuro committed Jun 29, 2024
1 parent af3bda4 commit 44e9379
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- uses: docker/setup-buildx-action@v3
with:
install: true

Expand All @@ -41,6 +39,7 @@ jobs:
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
type=semver,pattern={{version}}
type=ref,event=tag
type=sha
- name: Login to DockerHub
if: github.event_name != 'pull_request'
Expand All @@ -50,11 +49,15 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and maybe push Docker image
uses: docker/build-push-action@v5
# TODO remove next line
if: github.event_name != 'pull_request'
uses: docker/build-push-action@v6.2
with:
push: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
load: github.event_name == 'pull_request'
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
context: .
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64
Expand All @@ -75,7 +78,7 @@ jobs:
- name: Build Proto in Jaeger
if: github.event_name == 'pull_request'
working-directory: jaeger
run: make proto JAEGER_DOCKER_PROTOBUF=protobuf
run: make proto DOCKER_PROTOBUF_VERSION=latest

- name: Checkout jaeger-idl for validation
if: github.event_name == 'pull_request'
Expand All @@ -88,4 +91,4 @@ jobs:
- name: Build Proto in jaeger-idl
if: github.event_name == 'pull_request'
working-directory: jaeger-idl
run: make proto PROTOC_IMAGE=protobuf
run: make proto PROTOC_VER=latest
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ ARG PROTOC_GEN_GOGO_VERSION=b03c65ea87cdc3521ede29f62fe3ce239267c1bc
ARG PROTOC_GEN_LINT_VERSION=0.2.1
ARG UPX_VERSION=3.96

FROM alpine:${ALPINE_VERSION} as protoc_base
FROM alpine:${ALPINE_VERSION} AS protoc_base
RUN apk add --no-cache build-base curl cmake autoconf libtool git zlib-dev linux-headers && \
mkdir -p /out

FROM protoc_base as protoc_builder
FROM protoc_base AS protoc_builder
ARG GRPC_VERSION
RUN apk add --no-cache automake ninja && \
git clone --recursive --depth=1 -b v${GRPC_VERSION} https://github.com/grpc/grpc.git /grpc && \
Expand Down Expand Up @@ -72,7 +72,7 @@ RUN git clone --recursive --depth=1 -b v${GRPC_CSHARP_VERSION} https://github.co
rm -Rf /grpc


FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} as go_builder
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS go_builder
RUN apk add --no-cache build-base curl git
ENV GOBIN=/out/usr/bin

Expand Down Expand Up @@ -114,7 +114,7 @@ RUN mkdir -p ${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway && \
install -D $(find ./third_party/googleapis/google/rpc -name '*.proto') -t /out/usr/include/google/rpc


FROM alpine:${ALPINE_VERSION} as packer
FROM alpine:${ALPINE_VERSION} AS packer
RUN apk add --no-cache curl

ARG UPX_VERSION
Expand Down

0 comments on commit 44e9379

Please sign in to comment.