1
0
Fork 0
mirror of https://github.com/TsakiDev/gitea-comment.git synced 2024-03-02 18:30:00 +01:00

Update docker-image.yml

This commit is contained in:
Tsakiridis Ilias 2022-06-28 23:38:37 +03:00 committed by Ilias Tsakiridis
parent 66a59e4cb9
commit 250d11a4ff
2 changed files with 8 additions and 7 deletions

View File

@ -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

View File

@ -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"