Files
MindSift/.gitea/workflows/build-and-publish.yaml
T
sandrodachandClaude Opus 5.5 4e39b367bd
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m30s
release: v0.2 – collaboration docs, richer demo data, new screenshots
- Turn the collaboration plan into module docs (Doku/modules/collaboration.md)
  describing the implemented state; remove Doku/plans
- Header version comes from the build: git tag via APP_VERSION (CI passes
  it for tag builds), otherwise "<package version>-dev"; package 0.2.0
- Sample data (setup option and demo mode): six inbox thoughts, two task
  lists with Kanban states, subtasks and due dates, shopping and packing
  lists, three notes in folders incl. a long nested outline; demo mode
  shares the note and two lists with user/user
- e2e/screenshots.sh renews the README screenshots from demo data
- README: live collaboration, editor sharing, image tags, version badge

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 15:32:31 +01:00

62 lines
2.5 KiB
YAML

name: MindSift CI & Docker Release
on:
push:
branches-ignore:
- main
tags:
- '*'
jobs:
build-test-push:
name: Build, Test in Container & Push
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main'
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Determine Registry & Docker Tag
id: prep
run: |
SERVER_URL="${GITHUB_SERVER_URL:-https://git.dsit.me}"
REGISTRY_HOST=$(echo "${SERVER_URL}" | sed -E 's#^https?://##' | sed 's#/$##')
if [ -z "${REGISTRY_HOST}" ]; then
REGISTRY_HOST="git.dsit.me"
fi
REPO_PATH="${GITHUB_REPOSITORY:-sandrodach/mindsift}"
IMAGE_NAME=$(echo "${REGISTRY_HOST}/${REPO_PATH}" | tr '[:upper:]' '[:lower:]')
REF_NAME="${GITHUB_REF_NAME:-latest}"
ACTOR_NAME="${GITHUB_ACTOR:-sandrodach}"
# Ersetze evtl. Slashes in Branch-Namen (z.B. rc/1.1 -> rc-1.1) für valide Docker-Tags
DOCKER_TAG=$(echo "${REF_NAME}" | sed 's#/#-#g' | tr '[:upper:]' '[:lower:]')
echo "registry=${REGISTRY_HOST}" >> "$GITHUB_OUTPUT"
echo "image=${IMAGE_NAME}" >> "$GITHUB_OUTPUT"
echo "tag=${DOCKER_TAG}" >> "$GITHUB_OUTPUT"
echo "actor=${ACTOR_NAME}" >> "$GITHUB_OUTPUT"
# Releases (tags) show the tag as version in the app header
APP_VERSION=""
case "${GITHUB_REF:-}" in
refs/tags/*) APP_VERSION="${REF_NAME}" ;;
esac
echo "app_version=${APP_VERSION}" >> "$GITHUB_OUTPUT"
echo "Target Docker image: ${IMAGE_NAME}:${DOCKER_TAG} (Registry: ${REGISTRY_HOST}, Actor: ${ACTOR_NAME})"
- name: Login to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: ${{ steps.prep.outputs.registry }}
username: ${{ steps.prep.outputs.actor }}
password: ${{ secrets.PUSH_TOKEN || secrets.GITEA_TOKEN || github.token }}
- name: Build & Run All Checks in Container, then Push
run: |
FULL_IMAGE="${{ steps.prep.outputs.image }}:${{ steps.prep.outputs.tag }}"
echo "🚀 Building container & executing Frontend/Backend checks inside image: ${FULL_IMAGE}"
DOCKER_BUILDKIT=1 docker build --progress=plain --build-arg APP_VERSION="${{ steps.prep.outputs.app_version }}" -t "${FULL_IMAGE}" .
echo "✅ All checks & tests passed inside container! Pushing ${FULL_IMAGE}..."
docker push "${FULL_IMAGE}"