From e69f8de182bb24801e9a52a0b52970c530deaf71 Mon Sep 17 00:00:00 2001 From: Kyoichiro Yamada Date: Sat, 14 Nov 2020 22:12:31 +0900 Subject: [PATCH] apk add "git" in the Dockerfile --- .github/workflows/release.yml | 4 ++-- .github/workflows/test.yml | 2 +- Dockerfile | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 81f14de..2d852f9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,5 +41,5 @@ jobs: context: . push: true tags: | - ghcr.io/${{ github.repository_owner }}/git-vertag:latest - ghcr.io/${{ github.repository_owner }}/git-vertag:${{ steps.get_tag.outputs.TAG }} + ghcr.io/${{ github.repository }}:latest + ghcr.io/${{ github.repository }}:${{ steps.get_tag.outputs.TAG }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 996bb5a..404a14f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,7 +44,7 @@ jobs: context: . push: false tags: | - ghcr.io/${{ github.repository_owner }}/git-vertag:${{ github.sha }} + ghcr.io/${{ github.repository }}:draft lint: runs-on: ubuntu-latest diff --git a/Dockerfile b/Dockerfile index 5597e34..425e9d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,12 @@ +# Usage: +# docker run -it --rm gcr.io/kyoh86/git-vertag:latest -v ${PWD}:/work patch FROM golang:alpine AS build-stage ADD . /work WORKDIR /work RUN go build -o git-vertag . FROM alpine:latest +RUN apk update && apk add git +WORKDIR /work COPY --from=build-stage /work/git-vertag /usr/local/bin/git-vertag ENTRYPOINT ["/usr/local/bin/git-vertag"]