Fixed tests and git actions #30
39
.gitea/workflows/build-deploy.yaml
Normal file
39
.gitea/workflows/build-deploy.yaml
Normal 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 }}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
name: GoLang Tests
|
name: GoLang Tests
|
||||||
run-name: ${{ gitea.actor }} is testing golang Code
|
run-name: ${{ gitea.actor }} is testing golang Code
|
||||||
on: [push]
|
on: push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
testing:
|
testing:
|
||||||
@@ -46,27 +46,3 @@ jobs:
|
|||||||
arbeitszeitmessung-
|
arbeitszeitmessung-
|
||||||
- name: Run Go Tests
|
- name: Run Go Tests
|
||||||
run: cd Backend && go test ./...
|
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
|
|
||||||
Reference in New Issue
Block a user