Prevent deploy runner disk exhaustion
This commit is contained in:
@@ -4,6 +4,9 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
paths:
|
||||||
|
- "microservices/AuthApi/**"
|
||||||
|
- ".gitea/workflows/deploy-auth.yml"
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -20,6 +23,16 @@ jobs:
|
|||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Reclaim Docker build space
|
||||||
|
run: |
|
||||||
|
rm -f "${IMAGE_TAR}"
|
||||||
|
docker container prune -f
|
||||||
|
docker image prune -f
|
||||||
|
docker image prune -af --filter "until=24h"
|
||||||
|
docker builder prune -af || true
|
||||||
|
docker system df
|
||||||
|
df -h
|
||||||
|
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
# Build Docker image
|
# Build Docker image
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
@@ -59,18 +72,22 @@ jobs:
|
|||||||
# CLEANUP: delete TAR from nodes
|
# CLEANUP: delete TAR from nodes
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
- name: Clean TAR from nodes
|
- name: Clean TAR from nodes
|
||||||
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
for node in ${NODES}; do
|
for node in ${NODES}; do
|
||||||
echo "Removing image tar on $node ..."
|
echo "Removing image tar on $node ..."
|
||||||
ssh -o StrictHostKeyChecking=no hz@"$node" "rm -f /tmp/promiscuity-auth.tar"
|
ssh -o StrictHostKeyChecking=no hz@"$node" "rm -f /tmp/promiscuity-auth.tar" || true
|
||||||
done
|
done
|
||||||
|
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
# CLEANUP: delete TAR from runner
|
# CLEANUP: delete TAR from runner
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
- name: Clean TAR on runner
|
- name: Clean TAR on runner
|
||||||
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
rm -f "${IMAGE_TAR}"
|
rm -f "${IMAGE_TAR}"
|
||||||
|
docker image rm "${IMAGE_NAME}" 2>/dev/null || true
|
||||||
|
docker image prune -f
|
||||||
|
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
# Write kubeconfig from secret
|
# Write kubeconfig from secret
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
paths:
|
||||||
|
- "microservices/CharacterApi/**"
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
paths:
|
||||||
|
- "microservices/CraftingApi/**"
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
paths:
|
||||||
|
- "microservices/InventoryApi/**"
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
paths:
|
||||||
|
- "microservices/LocationsApi/**"
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
paths:
|
||||||
|
- "microservices/MailApi/**"
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
paths:
|
||||||
|
- "microservices/WorldApi/**"
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
Reference in New Issue
Block a user