Skip to content

Commit

Permalink
add job to release docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
robinbraemer committed Aug 7, 2020
1 parent 8acc9ea commit b14d4a0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,22 @@ on:
tags:
- '*'
jobs:
release:
image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build and push Docker image
uses: docker/build-push-action@v1
with:
always_pull: true
cache_froms: docker.pkg.github.com/${{ github.repository }}:latest
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: ${{ github.repository }}/gate
tag_with_ref: true
push: ${{ startsWith(github.ref, 'refs/tags/') }}
releaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,10 @@ COPY pkg pkg/
COPY gate.go ./

# Build
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -a -o gate gate.go
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o gate gate.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
# Final image
FROM alpine:latest
# Need this since gate is compiled with CGO_ENABLED=1
RUN apk add libc6-compat --no-cache
WORKDIR /gate
COPY --from=build /bin/grpc_health_probe bin/
COPY --from=build /workspace/gate .
Expand Down
1 change: 0 additions & 1 deletion pkg/proxy/proxy.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package proxy

import "C"
import (
"context"
"errors"
Expand Down

0 comments on commit b14d4a0

Please sign in to comment.