44 lines
1.0 KiB
YAML
44 lines
1.0 KiB
YAML
name: Test and release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "master"
|
|
paths-ignore:
|
|
- "README"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
env:
|
|
RUNNER_TOOL_CACHE: /toolcache
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Setup .NET 8.0
|
|
uses: actions/setup-dotnet@v3
|
|
with:
|
|
dotnet-version: '8.0'
|
|
- name: Test
|
|
run: dotnet test
|
|
release-image:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Install Docker
|
|
run: curl -fsSL https://get.docker.com | sh
|
|
- name: Login to Gitea Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: gitea.cebotari.ru
|
|
username: chebser
|
|
password: ${{ secrets.DOCKER_TOKEN }}
|
|
- name: Build app
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
push: true
|
|
tags: gitea.cebotari.ru/chebser/rhsolutions-api:latest |