summaryrefslogtreecommitdiff
path: root/.gitea/workflows/release.yaml
blob: 57b09e707b9a428c3c7581a39dcb253b1b094c3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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
    container:
      image: catthehacker/ubuntu:act-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - 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
      - name: Build database
        uses: docker/build-push-action@v5
        with:
          context: Database
          file: Database/Dockerfile    
          push: true
          tags: gitea.cebotari.ru/chebser/rhsolutions-db:latest