From 250d11a4fffeb9aee852fc0c379edc2d4529cb86 Mon Sep 17 00:00:00 2001 From: Tsakiridis Ilias Date: Tue, 28 Jun 2022 23:38:37 +0300 Subject: [PATCH] Update docker-image.yml --- .github/workflows/docker-image.yml | 13 ++++++++----- Dockerfile | 2 -- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 5ce4733..0974a14 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -14,17 +14,20 @@ jobs: steps: - uses: actions/checkout@v3 + - uses: actions/setup-dotnet@v2 + with: + dotnet-version: '3.1.x' + - name: Publish + run: | + dotnet publish -c Release -o artifacts + rm artifacts/*.pdb - name: Login to docker run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin - name: Determine version run: echo "VERSION=$(git describe --tags --dirty)" >> $GITHUB_ENV - - name: Build the Docker image - run: | - wget https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh - ./dotnet-install.sh --channel 3.1 - name: Build the Docker image run: | docker build . --file Dockerfile --tag tsakidev/giteacomment:${VERSION} docker build . --file Dockerfile --tag tsakidev/giteacomment:latest - name: Docker push - run: docker push tsakidev/giteacomment + run: docker push -a tsakidev/giteacomment diff --git a/Dockerfile b/Dockerfile index 32c5459..b5d99aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,4 @@ FROM mcr.microsoft.com/dotnet/core/runtime:3.1.8-buster-slim -RUN dotnet publish -c Release -o artifacts -RUN rm artifacts/*.pdb ADD artifacts/* /bin/ RUN chmod +x /bin/IT.GiteaComment CMD "/bin/IT.GiteaComment"