feat: Update gatekeeper image to latest, add new environment variables, and allow gatekeeper's own paths to prevent redirect loops.
Some checks failed
Build & Deploy KLZ Cables / 🔍 Prepare Environment (push) Successful in 9s
Build & Deploy KLZ Cables / 🏗️ Build App (push) Successful in 18s
Build & Deploy KLZ Cables / 🧪 Quality Assurance (push) Successful in 1m45s
Build & Deploy KLZ Cables / 🚀 Deploy (push) Successful in 27s
Build & Deploy KLZ Cables / ⚡ PageSpeed (push) Failing after 4m9s
Build & Deploy KLZ Cables / 🔔 Notifications (push) Successful in 1s

This commit is contained in:
2026-02-06 15:26:21 +01:00
parent 5fe0a8d83e
commit 57a3944301
8 changed files with 10 additions and 1175 deletions

View File

@@ -38,7 +38,6 @@ jobs:
gotify_priority: ${{ steps.determine.outputs.gotify_priority }}
short_sha: ${{ steps.determine.outputs.short_sha }}
commit_msg: ${{ steps.determine.outputs.commit_msg }}
gatekeeper_changed: ${{ steps.changes.outputs.gatekeeper_changed }}
container:
image: catthehacker/ubuntu:act-latest
steps:
@@ -54,22 +53,6 @@ jobs:
with:
fetch-depth: 2
- name: 🔍 Check for Gatekeeper changes
id: changes
shell: bash
run: |
if git rev-parse HEAD~1 >/dev/null 2>&1; then
if git diff --quiet HEAD~1 HEAD -- gatekeeper; then
echo "gatekeeper_changed=false" >> $GITHUB_OUTPUT
echo " No changes in gatekeeper/"
else
echo "gatekeeper_changed=true" >> $GITHUB_OUTPUT
echo "⚠️ Changes detected in gatekeeper/"
fi
else
echo "gatekeeper_changed=true" >> $GITHUB_OUTPUT
echo "🆕 First commit or no history, building gatekeeper."
fi
- name: 🔍 Environment & Version ermitteln
id: determine
@@ -232,58 +215,12 @@ jobs:
--cache-to type=registry,ref=registry.infra.mintel.me/mintel/klz-cables.com:buildcache,mode=max \
--push .
build-gatekeeper:
name: 🏗️ Build Gatekeeper
needs: prepare
if: ${{ needs.prepare.outputs.target != 'skip' }}
runs-on: docker
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: 🐳 Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: 🔐 Registry Login
run: |
echo "${{ secrets.REGISTRY_PASS }}" | docker login registry.infra.mintel.me -u "${{ secrets.REGISTRY_USER }}" --password-stdin
- name: 🏗️ Gatekeeper bauen & pushen
env:
IMAGE_TAG: ${{ needs.prepare.outputs.image_tag }}
CHG: ${{ needs.prepare.outputs.gatekeeper_changed }}
run: |
if [ "$CHG" == "true" ]; then
echo "🏗️ Building Gatekeeper (Changes detected)..."
docker buildx build \
--pull \
--platform linux/arm64 \
-t registry.infra.mintel.me/mintel/klz-cables-gatekeeper:$IMAGE_TAG \
--cache-from type=registry,ref=registry.infra.mintel.me/mintel/klz-cables-gatekeeper:buildcache \
--cache-to type=registry,ref=registry.infra.mintel.me/mintel/klz-cables-gatekeeper:buildcache,mode=max \
--push ./gatekeeper
else
echo "⏩ Skipping build, just re-tagging existing image..."
# Fast-track: tag the latest (or buildcache) as the new version
# We use buildx with cache but without rebuild triggers - it's near instant
docker buildx build \
--platform linux/arm64 \
-t registry.infra.mintel.me/mintel/klz-cables-gatekeeper:$IMAGE_TAG \
--cache-from type=registry,ref=registry.infra.mintel.me/mintel/klz-cables-gatekeeper:buildcache \
--push ./gatekeeper
fi
# ──────────────────────────────────────────────────────────────────────────────
# JOB 4: Deploy via SSH
# ──────────────────────────────────────────────────────────────────────────────
deploy:
name: 🚀 Deploy
needs: [prepare, build-app, build-gatekeeper, qa]
needs: [prepare, build-app, qa]
if: ${{ needs.prepare.outputs.target != 'skip' }}
runs-on: docker
container:
@@ -523,7 +460,7 @@ jobs:
# ──────────────────────────────────────────────────────────────────────────────
notifications:
name: 🔔 Notifications
needs: [prepare, qa, build-app, build-gatekeeper, deploy, pagespeed]
needs: [prepare, qa, build-app, deploy, pagespeed]
if: always()
runs-on: docker
container:
@@ -554,7 +491,6 @@ jobs:
needs.prepare.result == 'failure' ||
needs.qa.result == 'failure' ||
needs.build-app.result == 'failure' ||
needs.build-gatekeeper.result == 'failure' ||
needs.deploy.result == 'failure' ||
needs.pagespeed.result == 'failure'
run: |