1
0
mirror of https://github.com/TsakiDev/gitea-comment.git synced 2024-09-18 08:51:57 +02:00
gitea-comment/.github/workflows/docker-image.yml
2022-06-28 23:49:45 +03:00

34 lines
877 B
YAML

name: Docker Image CI
on:
push:
# branches: [ "master" ]
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
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: |
docker build . --file Dockerfile --tag tsakidev/giteacomment:${VERSION}
docker build . --file Dockerfile --tag tsakidev/giteacomment:latest
- name: Docker push
run: docker push -a tsakidev/giteacomment