....
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / Check and Create PR (push) Successful in 19s
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / Generate list of added/modified/deleted services (push) Successful in 52s
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / Docker Compose Dry Run (push) Failing after 1m51s
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / Cloudflare DNS Setup (push) Has been skipped
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / Update README & Generate List of Modified Services (push) Has been skipped
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / PR Merge (push) Has been skipped
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / Docker Compose Deployment (push) Has been skipped
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / Check and Create PR (push) Successful in 19s
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / Generate list of added/modified/deleted services (push) Successful in 52s
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / Docker Compose Dry Run (push) Failing after 1m51s
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / Cloudflare DNS Setup (push) Has been skipped
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / Update README & Generate List of Modified Services (push) Has been skipped
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / PR Merge (push) Has been skipped
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / Docker Compose Deployment (push) Has been skipped
This commit is contained in:
@@ -1,42 +1,51 @@
|
|||||||
name: "Pre-pull/build Docker images in parallel with timing"
|
name: "Pre-pull/build Docker images in parallel"
|
||||||
description: "Prepares all services for docker compose dry-run by pulling or building them concurrently with logs"
|
description: "Prepares services for docker compose dry-run by pulling or building them concurrently"
|
||||||
|
author: "Your Name <you@example.com>"
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
services:
|
services:
|
||||||
description: "Space-separated list of docker-compose services"
|
description: "Space-separated list of docker-compose services"
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Install yq (if missing)
|
- name: Pre-pull/build services
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if ! command -v yq >/dev/null 2>&1; then
|
set -euo pipefail
|
||||||
echo "Installing yq..."
|
|
||||||
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v4.44.1/yq_linux_amd64
|
SERVICES="${{ inputs.services }}"
|
||||||
sudo chmod +x /usr/local/bin/yq
|
if [ -z "$SERVICES" ]; then
|
||||||
|
echo "❌ No services provided. Exiting."
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Pre-pull/build images in parallel
|
echo "Services to process:"
|
||||||
shell: bash
|
echo "$SERVICES"
|
||||||
run: |
|
|
||||||
SERVICES="${{ inputs.services }}"
|
|
||||||
echo "Services to process: $SERVICES"
|
|
||||||
for svc in $SERVICES; do
|
for svc in $SERVICES; do
|
||||||
(
|
(
|
||||||
echo "🔹 Starting prep for service: $svc"
|
echo "🔹 Starting prep for service: $svc"
|
||||||
start_time=$(date +%s)
|
start_time=$(date +%s)
|
||||||
|
|
||||||
image=$(docker compose config | yq -r ".services[\"$svc\"].image // empty")
|
# Get image name; default to empty string if missing
|
||||||
build_dir=$(docker compose config | yq -r ".services[\"$svc\"].build.context // empty")
|
image=$(docker compose config | yq -r ".services[\"$svc\"].image // \"\"")
|
||||||
|
# Get build context; default to empty string if missing
|
||||||
|
build_dir=$(docker compose config | yq -r ".services[\"$svc\"].build.context // \"\"")
|
||||||
|
|
||||||
if [ -n "$image" ]; then
|
if [ -n "$image" ]; then
|
||||||
echo "➡️ Pulling image: $image"
|
echo "➡️ Pulling image for $svc: $image"
|
||||||
docker pull "$image"
|
if ! docker pull "$image"; then
|
||||||
|
echo "⚠️ Failed to pull image $image for service $svc"
|
||||||
|
fi
|
||||||
elif [ -n "$build_dir" ]; then
|
elif [ -n "$build_dir" ]; then
|
||||||
echo "⚙️ Building service: $svc from context: $build_dir"
|
echo "⚙️ Building service: $svc from context: $build_dir"
|
||||||
docker compose build "$svc"
|
if ! docker compose build "$svc"; then
|
||||||
|
echo "⚠️ Failed to build service $svc"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "⚠️ No image or build context found for $svc — skipping"
|
echo "⚠️ No image or build context for $svc — skipping"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
end_time=$(date +%s)
|
end_time=$(date +%s)
|
||||||
@@ -44,5 +53,6 @@ runs:
|
|||||||
echo "✅ Finished $svc in ${duration}s"
|
echo "✅ Finished $svc in ${duration}s"
|
||||||
) &
|
) &
|
||||||
done
|
done
|
||||||
|
|
||||||
wait
|
wait
|
||||||
echo "🎯 All services processed."
|
echo "🎯 All services processed."
|
||||||
|
|||||||
+1
-1
@@ -4954,7 +4954,7 @@ services:
|
|||||||
homepage.name: PlantUML
|
homepage.name: PlantUML
|
||||||
homepage.href: https://plantuml.${MY_TLD}
|
homepage.href: https://plantuml.${MY_TLD}
|
||||||
homepage.icon: plantuml.svg
|
homepage.icon: plantuml.svg
|
||||||
homepage.description: Textual diagram generator for UML & other visualizations
|
homepage.description: Textual diagram generator for UML & other visualizations.
|
||||||
swag: enable
|
swag: enable
|
||||||
swag_port: 8080
|
swag_port: 8080
|
||||||
swag_url: plantuml.${MY_TLD}
|
swag_url: plantuml.${MY_TLD}
|
||||||
|
|||||||
Reference in New Issue
Block a user