mirror of
https://github.com/TsakiDev/gitea-comment.git
synced 2024-11-22 01:51:57 +01:00
Update docker-image.yml
This commit is contained in:
parent
66a59e4cb9
commit
250d11a4ff
13
.github/workflows/docker-image.yml
vendored
13
.github/workflows/docker-image.yml
vendored
@ -14,17 +14,20 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- 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
|
- name: Login to docker
|
||||||
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin
|
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin
|
||||||
- name: Determine version
|
- name: Determine version
|
||||||
run: echo "VERSION=$(git describe --tags --dirty)" >> $GITHUB_ENV
|
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
|
- name: Build the Docker image
|
||||||
run: |
|
run: |
|
||||||
docker build . --file Dockerfile --tag tsakidev/giteacomment:${VERSION}
|
docker build . --file Dockerfile --tag tsakidev/giteacomment:${VERSION}
|
||||||
docker build . --file Dockerfile --tag tsakidev/giteacomment:latest
|
docker build . --file Dockerfile --tag tsakidev/giteacomment:latest
|
||||||
- name: Docker push
|
- name: Docker push
|
||||||
run: docker push tsakidev/giteacomment
|
run: docker push -a tsakidev/giteacomment
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
FROM mcr.microsoft.com/dotnet/core/runtime:3.1.8-buster-slim
|
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/
|
ADD artifacts/* /bin/
|
||||||
RUN chmod +x /bin/IT.GiteaComment
|
RUN chmod +x /bin/IT.GiteaComment
|
||||||
CMD "/bin/IT.GiteaComment"
|
CMD "/bin/IT.GiteaComment"
|
||||||
|
Loading…
Reference in New Issue
Block a user