From 478754ab0228a7e7ac88a8fde4b385b5a827c723 Mon Sep 17 00:00:00 2001 From: Michael Schiemer Date: Sat, 1 Nov 2025 17:24:20 +0100 Subject: [PATCH] chore: clean up and rename workflows --- .gitea/workflows/build-image.yml | 2 +- .gitea/workflows/cache-warm.yml | 2 +- .gitea/workflows/ci.yml | 2 +- .../workflows/test-registry-credentials.yml | 88 ------------------- .gitea/workflows/test-registry.yml | 61 ------------- 5 files changed, 3 insertions(+), 152 deletions(-) delete mode 100644 .gitea/workflows/test-registry-credentials.yml delete mode 100644 .gitea/workflows/test-registry.yml diff --git a/.gitea/workflows/build-image.yml b/.gitea/workflows/build-image.yml index 4c79cc48..14173ff7 100644 --- a/.gitea/workflows/build-image.yml +++ b/.gitea/workflows/build-image.yml @@ -1,4 +1,4 @@ -name: Build Docker Image +name: 🚀 Build & Deploy Image run-name: Build Image - ${{ github.ref_name }} - ${{ github.sha }} diff --git a/.gitea/workflows/cache-warm.yml b/.gitea/workflows/cache-warm.yml index 6db00fc9..409bf6e8 100644 --- a/.gitea/workflows/cache-warm.yml +++ b/.gitea/workflows/cache-warm.yml @@ -1,4 +1,4 @@ -name: Warm Docker Build Cache +name: 🧊 Warm Docker Build Cache run-name: Warm Cache - ${{ inputs.branch || 'main' }} diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 954f376d..806b2b55 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Continuous Integration +name: ✅ Continuous Integration run-name: CI Checks - ${{ github.ref_name || github.head_ref }} diff --git a/.gitea/workflows/test-registry-credentials.yml b/.gitea/workflows/test-registry-credentials.yml deleted file mode 100644 index 19d375b1..00000000 --- a/.gitea/workflows/test-registry-credentials.yml +++ /dev/null @@ -1,88 +0,0 @@ -name: Test Registry Credentials - -on: - workflow_dispatch: - -env: - REGISTRY: registry.michaelschiemer.de - DEPLOYMENT_HOST: 94.16.110.151 - -jobs: - test: - name: Test Registry Login - runs-on: docker-build - steps: - - name: Install git and setup environment - shell: sh - run: | - if ! command -v bash >/dev/null 2>&1 || ! command -v git >/dev/null 2>&1; then - apk add --no-cache git bash curl - fi - bash --version - git --version - - - name: Test with Gitea Secrets - shell: bash - run: | - echo "🔐 Teste Registry-Login mit Gitea Secrets..." - - REGISTRY_USER="${{ secrets.REGISTRY_USER }}" - REGISTRY_PASSWORD="${{ secrets.REGISTRY_PASSWORD }}" - TEST_URL="94.16.110.151:5000" - - echo "📝 Benutzer aus Secrets: ${REGISTRY_USER:0:3}*** (Länge: ${#REGISTRY_USER})" - echo "🔑 Password aus Secrets: ${REGISTRY_PASSWORD:+***} (Länge: ${#REGISTRY_PASSWORD})" - - if [ -z "$REGISTRY_USER" ]; then - echo "❌ REGISTRY_USER Secret ist leer!" - exit 1 - fi - - if [ -z "$REGISTRY_PASSWORD" ]; then - echo "❌ REGISTRY_PASSWORD Secret ist leer!" - exit 1 - fi - - # Teste Login mit Gitea Secrets - echo "" - echo "🔍 Teste Login mit Gitea Secrets..." - set +e - LOGIN_OUTPUT=$(echo "$REGISTRY_PASSWORD" | docker login "$TEST_URL" -u "$REGISTRY_USER" --password-stdin 2>&1) - LOGIN_EXIT_CODE=$? - set -e - - echo "Exit Code: $LOGIN_EXIT_CODE" - echo "Output: $LOGIN_OUTPUT" - - if [ $LOGIN_EXIT_CODE -eq 0 ]; then - echo "✅ Login mit Gitea Secrets erfolgreich!" - else - echo "❌ Login mit Gitea Secrets fehlgeschlagen" - - # Teste jetzt mit bekannten korrekten Credentials - echo "" - echo "🔍 Teste mit bekannten korrekten Credentials (admin / registry-secure-password-2025)..." - set +e - TEST_OUTPUT=$(echo "registry-secure-password-2025" | docker login "$TEST_URL" -u "admin" --password-stdin 2>&1) - TEST_EXIT_CODE=$? - set -e - - echo "Exit Code: $TEST_EXIT_CODE" - echo "Output: $TEST_OUTPUT" - - if [ $TEST_EXIT_CODE -eq 0 ]; then - echo "" - echo "⚠️ WICHTIG: Login mit Standard-Credentials funktioniert!" - echo "Das bedeutet, dass die Gitea Secrets falsch sind." - echo "" - echo "Bitte prüfe in Gitea:" - echo " Repository → Settings → Secrets" - echo "" - echo "REGISTRY_USER sollte sein: admin" - echo "REGISTRY_PASSWORD sollte sein: registry-secure-password-2025" - echo "" - echo "Oder falls das Passwort geändert wurde, verwende das aktuelle Passwort." - else - echo "❌ Auch Standard-Credentials schlagen fehl - mögliches Netzwerkproblem" - fi - fi diff --git a/.gitea/workflows/test-registry.yml b/.gitea/workflows/test-registry.yml deleted file mode 100644 index 67af1ffd..00000000 --- a/.gitea/workflows/test-registry.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Test Registry Credentials - -on: - workflow_dispatch: - push: - branches: [ main ] - paths: - - 'scripts/test-registry-credentials.sh' - - '.gitea/workflows/test-registry.yml' - -env: - REGISTRY_DOMAIN: registry.michaelschiemer.de - REGISTRY_HOST: 94.16.110.151 - -jobs: - test-credentials: - name: Test Registry Credentials - runs-on: docker-build - steps: - - name: Install git and setup environment - shell: sh - run: | - if ! command -v bash >/dev/null 2>&1 || ! command -v git >/dev/null 2>&1 || ! command -v curl >/dev/null 2>&1; then - apk add --no-cache git bash curl ca-certificates - fi - - - name: Checkout code - shell: bash - run: | - REF_NAME="${{ github.ref_name }}" - REPO="${{ github.repository }}" - if [ -z "$REF_NAME" ]; then - REF_NAME="main" - fi - - if [ -n "${{ secrets.CI_TOKEN }}" ]; then - git clone --depth 1 --branch "$REF_NAME" \ - "https://${{ secrets.CI_TOKEN }}@git.michaelschiemer.de/${REPO}.git" \ - /workspace/repo - else - git clone --depth 1 --branch "$REF_NAME" \ - "https://git.michaelschiemer.de/${REPO}.git" \ - /workspace/repo || \ - git clone --depth 1 \ - "https://git.michaelschiemer.de/${REPO}.git" \ - /workspace/repo - fi - - cd /workspace/repo - - - name: Test Registry Credentials - shell: bash - env: - REGISTRY_USER: ${{ secrets.REGISTRY_USER }} - REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} - REGISTRY_DOMAIN: ${{ env.REGISTRY_DOMAIN }} - REGISTRY_HOST: ${{ env.REGISTRY_HOST }} - REGISTRY_PORT: 5000 - run: | - cd /workspace/repo - ./scripts/test-registry-credentials.sh