Skip to content

Commit b2ddffd

Browse files
committed
docker for real this time
1 parent 90ab313 commit b2ddffd

File tree

3 files changed

+35
-18
lines changed

3 files changed

+35
-18
lines changed

.github/workflows/docker.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Docker
2+
3+
on:
4+
push:
5+
# Publish semver tags as releases.
6+
tags: ["v*.*.*"]
7+
pull_request:
8+
branches: ["fyra"]
9+
workflow_dispatch:
10+
11+
jobs:
12+
docker:
13+
uses: FyraLabs/actions/.github/workflows/docker.yml@main
14+
with:
15+
publish: ${{ github.event_name != 'pull_request' }}
16+
permissions:
17+
contents: read
18+
packages: write
19+
# This is used to complete the identity challenge
20+
# with sigstore/fulcio when running outside of PRs.
21+
id-token: write

.github/workflows/publish.yml

-18
This file was deleted.

Dockerfile

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# build stage
2+
FROM golang:alpine AS build
3+
RUN apk update && apk add git
4+
ADD . /src
5+
WORKDIR /src
6+
ENV CGO_ENABLED=0
7+
RUN go build \
8+
-o /tmp/bin
9+
# run stage
10+
FROM scratch
11+
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
12+
WORKDIR /app
13+
COPY --from=build /tmp/bin /app/bin
14+
ENTRYPOINT ["/app/bin"]

0 commit comments

Comments
 (0)