Fixed tests and git actions (#30)
All checks were successful
GoLang Tests / Run Go Tests (push) Successful in 2m46s
Arbeitszeitmessung Deploy / Build Go Image and Upload (push) Successful in 2m58s

Reviewed-on: #30
Co-authored-by: Tom Tröger <t.troeger.02@gmail.com>
Co-committed-by: Tom Tröger <t.troeger.02@gmail.com>
This commit is contained in:
2025-09-04 10:16:42 +02:00
committed by Tom Tröger
parent e9f8ab0a56
commit 327e47840b
9 changed files with 79 additions and 46 deletions

View File

@@ -0,0 +1,39 @@
name: Arbeitszeitmessung Deploy
run-name: ${{ gitea.actor }} is building and deploying arbeitszeitmesssung
on:
push:
branches:
- "main"
tags:
- "*"
workflow_run:
workflows: [tests]
types:
- completed
jobs:
build:
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 }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
context: Backend
tags: |
git.letsstein.de/tom/arbeitszeitmessung:latest
git.letsstein.de/tom/arbeitszeitmessung:${{ github.ref_name }}

View File

@@ -1,6 +1,6 @@
name: GoLang Tests
run-name: ${{ gitea.actor }} is testing golang Code
on: [push]
on: push
jobs:
testing:
@@ -46,27 +46,3 @@ jobs:
arbeitszeitmessung-
- name: Run Go Tests
run: cd Backend && go test ./...
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 }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: git.letsstein.de/tom/arbeitszeitmessung:latest
context: Backend