diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index e112b79..42f44e2 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -4,55 +4,13 @@ on: push: tags: - "*" + branches: + - main jobs: - testing: - name: Run Go Tests - runs-on: ubuntu-latest - services: - postgres: - image: postgres:16 - env: - POSTGRES_USER: root - POSTGRES_PASSWORD: password - POSTGRES_DB: arbeitszeitmessung - env: - POSTGRES_HOST: postgres - POSTGRES_USER: root - POSTGRES_PASSWORD: password - POSTGRES_DB: arbeitszeitmessung - POSTGRES_PORT: 5432 - RUNNER_TOOL_CACHE: /toolcache # Runner Tool Cache - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup go - uses: actions/setup-go@v5 - with: - go-version-file: Backend/go.mod - - uses: https://gitea.com/actions/go-hashfiles@v0.0.1 - id: hash-go - with: - patterns: | - go.mod - go.sum - - name: cache go - id: cache-go - uses: actions/cache@v4 - with: - path: |- - /go_path - /go_cache - key: arbeitszeitmessung-${{ steps.hash-go.outputs.hash }} - restore-keys: |- - arbeitszeitmessung- - - name: Run Go Tests - run: cd Backend && go test ./... - build: + webserver: name: Build Go Image and Upload runs-on: ubuntu-latest - needs: [testing] steps: - name: Checkout uses: actions/checkout@v4 @@ -66,12 +24,49 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: git.letsstein.de/tom/arbeitszeitmessung-webserver + tags: | + type=raw,value=latest + type=pep440,pattern={{version}} - name: Build and push uses: docker/build-push-action@v6 with: platforms: linux/amd64,linux/arm64 push: true context: Backend + tags: ${{ steps.meta.outputs.tags }} + document-creator: + 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: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: git.letsstein.de/tom/arbeitszeitmessung-doc-creator tags: | - git.letsstein.de/tom/arbeitszeitmessung-webserver:latest - git.letsstein.de/tom/arbeitszeitmessung-webserver:${{ github.ref_name }} + type=raw,value=latest + type=pep440,pattern={{version}} + - name: Build and push + uses: docker/build-push-action@v6 + with: + platforms: linux/amd64,linux/arm64 + push: true + context: Backend + tags: ${{ steps.meta.outputs.tags }} diff --git a/WIR-typst/main.typ b/WIR-typst/main.typ deleted file mode 100644 index 2f9effa..0000000 --- a/WIR-typst/main.typ +++ /dev/null @@ -1,63 +0,0 @@ -#set page("a4") -#set text(font: "Lato") - -= Stunden - -== Kim Mustermensch - -Zeitraum: 01.10.2025 - 31.10.2025 - -Arbeitszeit: 136h 19min - -Überstunden: -39h 41min - - - - - -// #show table.cell: it => { -// if it.y == 0 { -// set text(white) -// strong(it) -// } else if it.body == [] { -// // Replace empty cells with 'N/A' -// pad(..it.inset)[0min] - -// } else { -// it -// } -// } - -#let subgrid(body) = { - table.cell(colspan: 3, inset: 0em)[ - #table( - columns: (1fr, 1fr, 1fr), - gutter: 0em, - stroke: black, - [..#body] - ) - ] -} - - - "01.09.2025", - "08:07", - "16:28", - "Büro", - "7h 51min", - "30min", - "-9min", - "02.09.2025", - // return work, pause, overtime -table.cell(colspan: 3, inset: 0em)[#table( - columns: (1fr, 1fr, 1fr), - gutter: 0em, - stroke: black, - [08:12], [16:24], [Büro], - [16:30], [17:24], [Homeoffice] - )], - "6h", - "0min", - "-1h 15min" - -) \ No newline at end of file diff --git a/WIR-typst/template.pdf b/WIR-typst/template.pdf deleted file mode 100644 index db53c7a..0000000 Binary files a/WIR-typst/template.pdf and /dev/null differ