From 007d30f87442ffeadaaa79e69f9ca43a02029185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20Tr=C3=B6ger?= Date: Thu, 21 Aug 2025 22:51:35 +0200 Subject: [PATCH] Added Build Step --- .gitea/workflows/testing.yaml | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/.gitea/workflows/testing.yaml b/.gitea/workflows/testing.yaml index fd4a4e3..448ac95 100644 --- a/.gitea/workflows/testing.yaml +++ b/.gitea/workflows/testing.yaml @@ -4,7 +4,7 @@ on: [push] jobs: testing: - name: check and test + name: Run Go Tests runs-on: ubuntu-latest services: postgres: @@ -22,8 +22,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - with: - fetch-depth: 0 # all history for all branches and tags - name: Setup go uses: actions/setup-go@v5 @@ -44,18 +42,18 @@ jobs: /go_path /go_cache key: go_path-${{ steps.hash-go.outputs.hash }} - # - name: Setup test database - # run: | - # docker run -d --rm --name postgres_build_db \ - # -p $POSTGRES_PORT:5432 \ - # -e POSTGRES_USER=$POSTGRES_USER \ - # -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD \ - # -e POSTGRES_DB=$POSTGRES_DB \ - # postgres:16 - # while [[ $(docker logs postgres_build_db 2>&1 | grep -c "database system is ready to accept connections") == 0 ]]; do - # sleep 1; - # done; - name: Run Go Tests run: cd Backend && go test ./... - # - name: Shutdown Postgres DB - # run: docker stop postgres_build_db + build: + needs: testing + name: Build Go Image and Upload + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: git.letsstein.de + username: ${{ gitea.actor }} + password: ${{ secrets.REGISTRY_TOKEN }}