From c7f8595474e24bf3e362dfc67d1c95453a3c66b7 Mon Sep 17 00:00:00 2001 From: tom Date: Fri, 12 Dec 2025 14:28:49 +0100 Subject: [PATCH] updated github workflow for document creator --- .gitea/workflows/build.yaml | 89 +++++++++++++++++------------------- WIR-typst/main.typ | 63 ------------------------- WIR-typst/template.pdf | Bin 2193 -> 0 bytes 3 files changed, 42 insertions(+), 110 deletions(-) delete mode 100644 WIR-typst/main.typ delete mode 100644 WIR-typst/template.pdf 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 db53c7ae6ae2d912d5f666f3260dc937145546e3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2193 zcma)8&2Hm15Z*&iTJ#+V6#)_ywnWKtY(dsyW39VJ<6Xlxwu`1Y&=Rf4kwk%_VI`+N zLLXo+z4aY>=nEC-D|ATz$xgDZE|xxiGn{Y8neo{;7&LJ6Qak$<9!Z%hw;1 z2qKi}nH+`b?Coo@x1R$qp95tM4%>hJIA79GAn8=4cuWK+&5?AdfOnPnVJbj2lI|4L zXDQ>;f`k-xcGv*Yjyw-SszoJNH+$8gfdT8+GAb!iJ6%McnsvU^dn~fdkNek4Fo45)8Ix@YU1rgeY9YSg+U3wcTVq zHgLDwHB8H}tOhU|kc%EHf%n0Mk5Tjz(YSX4w&aHjcl}7e)~uEQ(q-jzWP2 z2*m~_WIik0{^okk7)$;74fBlCRY@O>+<=8EseKsuv*9?JT&|Z(YZ&&UFka3HGvD@l z%J!JLH6G@rAbCjthjESSMWMT3JR`yY-wyt1@