From 6c78351a95350ebedfcd58e16c2c14a9b97abbb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Ty=C5=84ski?= Date: Sun, 4 Oct 2026 00:57:40 +0200 Subject: [PATCH] ci: add disabled Gitea Actions CI/CD workflows Add CI and CD workflows for backend, frontend and image publishing. The workflows are fully commented out because no Gitea Actions runner is attached; uncomment once a runner is registered. --- .gitea/workflows/cd.yml | 50 +++++++++++++++++++++++++++++++++++++++++ .gitea/workflows/ci.yml | 46 +++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 .gitea/workflows/cd.yml create mode 100644 .gitea/workflows/ci.yml diff --git a/.gitea/workflows/cd.yml b/.gitea/workflows/cd.yml new file mode 100644 index 0000000..ebcf556 --- /dev/null +++ b/.gitea/workflows/cd.yml @@ -0,0 +1,50 @@ +# CD workflow — DISABLED. +# No Gitea Actions runner is attached to this repository yet, so the workflow +# below is fully commented out to avoid failing runs. Uncomment everything once +# a runner is registered (repository Settings -> Actions -> Runners). + +# name: CD +# +# on: +# push: +# branches: [main] +# tags: ["v*"] +# +# jobs: +# publish: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - name: Read version +# id: version +# run: | +# VERSION=$(sed -n 's:.*\(.*\).*:\1:p' backend/TarninaHub.csproj | head -1) +# echo "version=$VERSION" >> "$GITHUB_OUTPUT" +# - name: Log in to registry +# run: echo "${{ secrets.GITEA_TOKEN }}" | docker login git.rtynski.pl -u "${{ github.actor }}" --password-stdin +# - name: Build image +# run: | +# docker build \ +# --build-arg APP_VERSION=${{ steps.version.outputs.version }} \ +# -t git.rtynski.pl/rtynski/hy2026:${{ steps.version.outputs.version }} \ +# -t git.rtynski.pl/rtynski/hy2026:latest . +# - name: Push image +# run: | +# docker push git.rtynski.pl/rtynski/hy2026:${{ steps.version.outputs.version }} +# docker push git.rtynski.pl/rtynski/hy2026:latest +# +# # Deploy demo runs after the image is published from `main`. +# # Configure DEPLOY_HOST / DEPLOY_USER / DEPLOY_SSH_KEY as CI secrets. +# # deploy: +# # needs: publish +# # if: github.ref == 'refs/heads/main' +# # runs-on: ubuntu-latest +# # steps: +# # - name: Deploy over SSH +# # run: | +# # echo "${{ secrets.DEPLOY_SSH_KEY }}" > key && chmod 600 key +# # ssh -i key -o StrictHostKeyChecking=no \ +# # "${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}" \ +# # "cd /opt/tarninahub && APP_VERSION=latest docker compose pull && docker compose up -d" +# # - name: Smoke test +# # run: curl -fsS "http://${{ secrets.DEPLOY_HOST }}:8075/api/health" diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..100989e --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,46 @@ +# CI workflow — DISABLED. +# No Gitea Actions runner is attached to this repository yet, so the workflow +# below is fully commented out to avoid failing runs. Uncomment everything once +# a runner is registered (repository Settings -> Actions -> Runners). + +# name: CI +# +# on: +# push: +# branches: [main] +# pull_request: +# branches: [main] +# +# jobs: +# backend: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - uses: actions/setup-dotnet@v4 +# with: +# dotnet-version: "10.0.x" +# - name: Restore +# run: dotnet restore backend/TarninaHub.csproj +# - name: Build +# run: dotnet build backend/TarninaHub.csproj --configuration Release --no-restore +# - name: Format check +# run: dotnet format backend/TarninaHub.csproj --verify-no-changes +# # Tests: enabled once test projects are added (`dotnet test`). +# +# frontend: +# runs-on: ubuntu-latest +# defaults: +# run: +# working-directory: client +# steps: +# - uses: actions/checkout@v4 +# - uses: actions/setup-node@v4 +# with: +# node-version: "22" +# cache: npm +# cache-dependency-path: client/package-lock.json +# - name: Install +# run: npm ci +# - name: Build (typecheck + bundle) +# run: npm run build +# # Lint: enabled once ESLint is wired up (`npm run lint`).