ci: standardize runner containers and harden script output logic
Some checks failed
Build & Deploy KLZ Cables / 🔍 Prepare Environment (push) Failing after 57s
Build & Deploy KLZ Cables / 🧪 Quality Assurance (push) Has been skipped
Build & Deploy KLZ Cables / 🏗️ Build App (push) Has been skipped
Build & Deploy KLZ Cables / 🏗️ Build Gatekeeper (push) Has been skipped
Build & Deploy KLZ Cables / 🚀 Deploy (push) Has been skipped
Build & Deploy KLZ Cables / ⚡ PageSpeed (push) Has been skipped
Build & Deploy KLZ Cables / 🔔 Notifications (push) Successful in 2s
Some checks failed
Build & Deploy KLZ Cables / 🔍 Prepare Environment (push) Failing after 57s
Build & Deploy KLZ Cables / 🧪 Quality Assurance (push) Has been skipped
Build & Deploy KLZ Cables / 🏗️ Build App (push) Has been skipped
Build & Deploy KLZ Cables / 🏗️ Build Gatekeeper (push) Has been skipped
Build & Deploy KLZ Cables / 🚀 Deploy (push) Has been skipped
Build & Deploy KLZ Cables / ⚡ PageSpeed (push) Has been skipped
Build & Deploy KLZ Cables / 🔔 Notifications (push) Successful in 2s
This commit is contained in:
@@ -39,6 +39,8 @@ jobs:
|
|||||||
short_sha: ${{ steps.determine.outputs.short_sha }}
|
short_sha: ${{ steps.determine.outputs.short_sha }}
|
||||||
commit_msg: ${{ steps.determine.outputs.commit_msg }}
|
commit_msg: ${{ steps.determine.outputs.commit_msg }}
|
||||||
gatekeeper_changed: ${{ steps.changes.outputs.gatekeeper_changed }}
|
gatekeeper_changed: ${{ steps.changes.outputs.gatekeeper_changed }}
|
||||||
|
container:
|
||||||
|
image: catthehacker/ubuntu:act-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -47,6 +49,7 @@ jobs:
|
|||||||
|
|
||||||
- name: 🔍 Check for Gatekeeper changes
|
- name: 🔍 Check for Gatekeeper changes
|
||||||
id: changes
|
id: changes
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if git rev-parse HEAD~1 >/dev/null 2>&1; then
|
if git rev-parse HEAD~1 >/dev/null 2>&1; then
|
||||||
if git diff --quiet HEAD~1 HEAD -- gatekeeper; then
|
if git diff --quiet HEAD~1 HEAD -- gatekeeper; then
|
||||||
@@ -122,19 +125,21 @@ jobs:
|
|||||||
TARGET="skip"
|
TARGET="skip"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "target=$TARGET" >> $GITHUB_OUTPUT
|
{
|
||||||
echo "image_tag=$IMAGE_TAG" >> $GITHUB_OUTPUT
|
echo "target=$TARGET"
|
||||||
echo "env_file=$ENV_FILE" >> $GITHUB_OUTPUT
|
echo "image_tag=$IMAGE_TAG"
|
||||||
echo "traefik_host=$TRAEFIK_HOST" >> $GITHUB_OUTPUT
|
echo "env_file=$ENV_FILE"
|
||||||
echo "next_public_base_url=$NEXT_PUBLIC_BASE_URL" >> $GITHUB_OUTPUT
|
echo "traefik_host=$TRAEFIK_HOST"
|
||||||
echo "directus_url=$DIRECTUS_URL" >> $GITHUB_OUTPUT
|
echo "next_public_base_url=$NEXT_PUBLIC_BASE_URL"
|
||||||
echo "directus_host=$DIRECTUS_HOST" >> $GITHUB_OUTPUT
|
echo "directus_url=$DIRECTUS_URL"
|
||||||
echo "project_name=$PROJECT_NAME" >> $GITHUB_OUTPUT
|
echo "directus_host=$DIRECTUS_HOST"
|
||||||
echo "is_prod=$IS_PROD" >> $GITHUB_OUTPUT
|
echo "project_name=$PROJECT_NAME"
|
||||||
echo "gotify_title=$GOTIFY_TITLE" >> $GITHUB_OUTPUT
|
echo "is_prod=$IS_PROD"
|
||||||
echo "gotify_priority=$GOTIFY_PRIORITY" >> $GITHUB_OUTPUT
|
echo "gotify_title=$GOTIFY_TITLE"
|
||||||
echo "short_sha=$SHORT_SHA" >> $GITHUB_OUTPUT
|
echo "gotify_priority=$GOTIFY_PRIORITY"
|
||||||
echo "commit_msg=$COMMIT_MSG" >> $GITHUB_OUTPUT
|
echo "short_sha=$SHORT_SHA"
|
||||||
|
echo "commit_msg=$COMMIT_MSG"
|
||||||
|
} >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
# ──────────────────────────────────────────────────────────────────────────────
|
# ──────────────────────────────────────────────────────────────────────────────
|
||||||
# JOB 2: Quality Assurance (Lint & Test)
|
# JOB 2: Quality Assurance (Lint & Test)
|
||||||
@@ -144,6 +149,8 @@ jobs:
|
|||||||
needs: prepare
|
needs: prepare
|
||||||
if: needs.prepare.outputs.target != 'skip'
|
if: needs.prepare.outputs.target != 'skip'
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: catthehacker/ubuntu:act-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -274,6 +281,8 @@ jobs:
|
|||||||
needs: [prepare, build-app, build-gatekeeper, qa]
|
needs: [prepare, build-app, build-gatekeeper, qa]
|
||||||
if: ${{ needs.prepare.outputs.target != 'skip' }}
|
if: ${{ needs.prepare.outputs.target != 'skip' }}
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: catthehacker/ubuntu:act-latest
|
||||||
env:
|
env:
|
||||||
TARGET: ${{ needs.prepare.outputs.target }}
|
TARGET: ${{ needs.prepare.outputs.target }}
|
||||||
IMAGE_TAG: ${{ needs.prepare.outputs.image_tag }}
|
IMAGE_TAG: ${{ needs.prepare.outputs.image_tag }}
|
||||||
@@ -388,6 +397,8 @@ jobs:
|
|||||||
needs.deploy.result == 'success' &&
|
needs.deploy.result == 'success' &&
|
||||||
github.event.inputs.skip_long_checks != 'true'
|
github.event.inputs.skip_long_checks != 'true'
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: catthehacker/ubuntu:act-latest
|
||||||
outputs:
|
outputs:
|
||||||
report_url: ${{ steps.save.outputs.report_url }}
|
report_url: ${{ steps.save.outputs.report_url }}
|
||||||
steps:
|
steps:
|
||||||
@@ -485,9 +496,11 @@ jobs:
|
|||||||
# ──────────────────────────────────────────────────────────────────────────────
|
# ──────────────────────────────────────────────────────────────────────────────
|
||||||
notifications:
|
notifications:
|
||||||
name: 🔔 Notifications
|
name: 🔔 Notifications
|
||||||
needs: [prepare, qa, build, deploy, pagespeed]
|
needs: [prepare, qa, build-app, build-gatekeeper, deploy, pagespeed]
|
||||||
if: always()
|
if: always()
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: catthehacker/ubuntu:act-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 📊 Deployment Summary
|
- name: 📊 Deployment Summary
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user