Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
Build image testwise
Browse files Browse the repository at this point in the history
  • Loading branch information
dkrizic committed May 8, 2024
1 parent 9b68b0d commit f3e0302
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.github
main
delete-from-enterprise
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ jobs:
run: docker push ghcr.io/prodyna/delete-from-enterprise:latest

# if tagged, push the image to the GitHub Container Registry
- name: Push the tagged Docker image to the GitHub Container Registry
- name: Tag with git tag and push to GitHub Container Registry
# only if it is a tag
if: startsWith(github.ref, 'refs/tags/v')
run: |
docker tag ghcr.io/prodyna/delete-from-enterprise:latest ghcr.io/prodyna/delete-from-enterprise:${{ env.tag }}
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.22.1-alpine3.19 as build
FROM golang:1.22.2-alpine3.19 as build

WORKDIR /app
COPY . /app
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-extldflags=-static -X github.com/prodyna/delete-from-enterprise/meta.Version=1.0.0" -o delete-from-enterprise main.go
COPY . .
RUN go build . -o delete-from-enterprise

FROM alpine:3.19.1
COPY --from=build /app/delete-from-enterprise /app/
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ github.com/microsoft/kiota-serialization-multipart-go v1.0.0 h1:3O5sb5Zj+moLBiJy
github.com/microsoft/kiota-serialization-multipart-go v1.0.0/go.mod h1:yauLeBTpANk4L03XD985akNysG24SnRJGaveZf+p4so=
github.com/microsoft/kiota-serialization-text-go v1.0.0 h1:XOaRhAXy+g8ZVpcq7x7a0jlETWnWrEum0RhmbYrTFnA=
github.com/microsoft/kiota-serialization-text-go v1.0.0/go.mod h1:sM1/C6ecnQ7IquQOGUrUldaO5wj+9+v7G2W3sQ3fy6M=
github.com/microsoftgraph/msgraph-sdk-go v1.40.0 h1:ohgvTqcyli9DI5Hv0H5T/ZNTT2uTHBBDFwpsBX/Y4lw=
github.com/microsoftgraph/msgraph-sdk-go v1.40.0/go.mod h1:u/ciVhK5eBqzQvsVnTVdeEl+Jgy9WbUoUHHKgcw54hk=
github.com/microsoftgraph/msgraph-sdk-go v1.41.0 h1:PyfNMCElk3J5l4Fkm7FfJpiPyugeIeOf3Vuz/aTQmsY=
github.com/microsoftgraph/msgraph-sdk-go v1.41.0/go.mod h1:u/ciVhK5eBqzQvsVnTVdeEl+Jgy9WbUoUHHKgcw54hk=
github.com/microsoftgraph/msgraph-sdk-go-core v1.1.0 h1:NB7c/n4Knj+TLaLfjsahhSqoUqoN/CtyNB0XIe/nJnM=
Expand Down

0 comments on commit f3e0302

Please sign in to comment.