diff --git a/Dockerfile-action b/Dockerfile-action new file mode 100644 index 0000000..f0d617f --- /dev/null +++ b/Dockerfile-action @@ -0,0 +1,17 @@ +# syntax=docker/dockerfile:1.2.1-labs + +FROM golang:1-alpine as baseimg + +RUN apk add make +WORKDIR /go/src/app +ENV GO111MODULE=on CGO_ENABLED=1 GOOS=linux +COPY . /go/src/app/ +RUN make + +FROM alpine:latest +RUN apk add --no-cache ca-certificates +WORKDIR /go/src/app +COPY --from=baseimg /go/src/app/semver-gen . +COPY --from=baseimg /go/src/app/config-release.yaml config.yaml +COPY entrypoint.sh entrypoint.sh +ENTRYPOINT ["./entrypoint.sh"] \ No newline at end of file diff --git a/action.yml b/action.yml index 8cccc57..0a4da89 100644 --- a/action.yml +++ b/action.yml @@ -17,9 +17,8 @@ outputs: description: 'Calculated semantic version' runs: using: 'docker' - image: 'Dockerfile' + image: 'ghcr.io/lukaszraczylo/semver-generator:latest' args: - - generate - ${{ inputs.config_file }} - ${{ inputs.repository_url }} - ${{ inputs.repository_local }} \ No newline at end of file