Skip to content

Commit

Permalink
fix up cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
bagel-dawg committed Jun 2, 2024
1 parent 7206817 commit 1a047e1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 38 deletions.
5 changes: 0 additions & 5 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
Dockerfile
go.mod
go.sum
main.go
Makefile
4 changes: 1 addition & 3 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ on:
jobs:
build-and-publish:
runs-on: ubuntu-latest
strategy:
fail-fast: false
env:
IMAGE_NAME: ses-smtpd-proxy
steps:
Expand Down Expand Up @@ -37,7 +35,7 @@ jobs:
echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
echo "IMAGE_VERSION=$(cat version.txt)" >> $GITHUB_ENV
- name: Build and scan image
- name: Build image
run: |
docker build --no-cache -t ${IMAGE_NAME} -t localimage:localtag .
Expand Down
15 changes: 5 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
FROM golang:1.18 as build

WORKDIR /go/src/ses-smtpd-proxy
COPY . .
WORKDIR /go/src/app
COPY . /go/src/app

RUN go mod download
RUN go vet -v
RUN go test -v

RUN CGO_ENABLED=0 go build -o ses-smtpd-proxy
RUN CGO_ENABLED=0 go build -o /go/bin/app

FROM gcr.io/distroless/static-debian11

ADD ses-smtpd-proxy /

CMD [ "/ses-smtpd-proxy" ]
COPY --from=build /go/bin/app /
CMD ["/app"]
20 changes: 0 additions & 20 deletions Makefile

This file was deleted.

0 comments on commit 1a047e1

Please sign in to comment.