Merge pull request '3.0.0' (#220) from dev into main
Some checks failed
Build and Release FEDEO / verify (push) Failing after 22s
Build and Release FEDEO / build-and-release (push) Has been skipped

Reviewed-on: #220
This commit was merged in pull request #220.
This commit is contained in:
2026-09-20 16:10:46 +00:00
768 changed files with 245540 additions and 10615 deletions

View File

@@ -1,77 +1,53 @@
name: Build and Push Docker Images
run-name: Build Backend & Frontend by @${{ github.actor }}
name: Build and Release FEDEO
on: [push]
env:
# Passe dies an deine Registry an.
# Wenn du die Gitea-interne Registry nutzt, ist es meist einfach der Hostname deiner Gitea-Instanz.
# Beispiel: gitea.deine-domain.de
REGISTRY_HOST: git.federspiel.tech
# Der Name des Repos (z.B. user/repo)
IMAGE_NAME: ${{ github.repository }}
ACTOR: flfeders
on:
push:
branches: [dev, main]
workflow_dispatch:
jobs:
build-backend:
verify:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Log in to Docker Registry
uses: docker/login-action@v2
- uses: actions/checkout@v4
with:
registry: ${{ env.REGISTRY_HOST }}
# Gitea stellt secrets.GITHUB_TOKEN automatisch bereit (wie GitLab CI_JOB_TOKEN)
username: ${{ env.ACTOR }}
password: ${{ vars.CI_TOKEN }}
- name: Extract metadata (tags, labels) for Backend
id: meta-backend
uses: docker/metadata-action@v4
ref: ${{ github.sha }}
fetch-depth: 0
- uses: actions/setup-node@v4
with:
images: ${{ env.REGISTRY_HOST }}/${{ env.IMAGE_NAME }}/backend
tags: |
type=ref,event=branch
type=ref,event=tag
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
node-version: '22'
- run: npm ci --ignore-scripts --no-audit --no-fund
- name: Test release planning and recovery
run: npm test
- name: Check Conventional Commits
run: npm run commits:check
- name: Build and push Backend
uses: docker/build-push-action@v4
with:
context: ./backend # Hier wird der Ordner gewechselt (wie 'cd backend')
push: true
tags: ${{ steps.meta-backend.outputs.tags }}
labels: ${{ steps.meta-backend.outputs.labels }}
build-frontend:
build-and-release:
needs: verify
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Log in to Docker Registry
uses: docker/login-action@v2
- uses: actions/checkout@v4
with:
registry: ${{ env.REGISTRY_HOST }}
username: ${{ env.ACTOR }}
password: ${{ vars.CI_TOKEN }}
- name: Extract metadata (tags, labels) for Frontend
id: meta-frontend
uses: docker/metadata-action@v4
ref: ${{ github.sha }}
fetch-depth: 0
# Prefer repository secrets; retain the existing variable during migration.
token: ${{ secrets.RELEASE_TOKEN || secrets.CI_TOKEN || vars.CI_TOKEN }}
- uses: actions/setup-node@v4
with:
images: ${{ env.REGISTRY_HOST }}/${{ env.IMAGE_NAME }}/frontend
tags: |
type=ref,event=branch
type=ref,event=tag
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
- name: Build and push Frontend
uses: docker/build-push-action@v4
node-version: '22'
- run: npm ci --ignore-scripts --no-audit --no-fund
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
context: ./frontend # Hier wird der Ordner gewechselt (wie 'cd frontend')
push: true
tags: ${{ steps.meta-frontend.outputs.tags }}
labels: ${{ steps.meta-frontend.outputs.labels }}
registry: git.federspiel.tech
username: flfeders
password: ${{ secrets.CI_TOKEN || vars.CI_TOKEN }}
- name: Build all images and publish main releases
# Gitea 1.25 ignores concurrency. ci.mjs uses an atomic Git ref lock instead.
env:
CI: 'true'
FEDEO_REF: ${{ github.ref }}
FEDEO_SHA: ${{ github.sha }}
FEDEO_EVENT_NAME: ${{ github.event_name }}
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN || secrets.CI_TOKEN || vars.CI_TOKEN }}
run: npm run release:ci