From 70f2d92f1c55d325729834632622aef54d53e819 Mon Sep 17 00:00:00 2001 From: Serghei Cebotari Date: Mon, 29 Jan 2024 13:22:27 +0300 Subject: Add database image build --- .gitea/workflows/release.yaml | 49 +++++++++++++++++++++++++++++++++++++++++++ .gitea/workflows/test.yaml | 42 ------------------------------------- 2 files changed, 49 insertions(+), 42 deletions(-) create mode 100644 .gitea/workflows/release.yaml delete mode 100644 .gitea/workflows/test.yaml (limited to '.gitea') diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml new file mode 100644 index 0000000..d8d7e36 --- /dev/null +++ b/.gitea/workflows/release.yaml @@ -0,0 +1,49 @@ +name: Test and release + +on: + push: + branches: + - "master" + 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: . + file: Database/Dockerfile + push: true + tags: gitea.cebotari.ru/chebser/rhsolutions-db:latest \ No newline at end of file diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml deleted file mode 100644 index bfe15ed..0000000 --- a/.gitea/workflows/test.yaml +++ /dev/null @@ -1,42 +0,0 @@ -name: Test API - -on: - push: - branches: - - "master" - 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 and push - uses: docker/build-push-action@v5 - with: - context: . - file: ./Dockerfile - push: true - tags: gitea.cebotari.ru/chebser/rhsolutions-api:latest \ No newline at end of file -- cgit v1.2.3