chore: clean up and rename workflows
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
name: Build Docker Image
|
||||
name: 🚀 Build & Deploy Image
|
||||
|
||||
run-name: Build Image - ${{ github.ref_name }} - ${{ github.sha }}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Warm Docker Build Cache
|
||||
name: 🧊 Warm Docker Build Cache
|
||||
|
||||
run-name: Warm Cache - ${{ inputs.branch || 'main' }}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Continuous Integration
|
||||
name: ✅ Continuous Integration
|
||||
|
||||
run-name: CI Checks - ${{ github.ref_name || github.head_ref }}
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user