Compare commits

..
2 Commits
Author SHA1 Message Date
Lyncoln 9e937d7686 Changed log level of self.address_string
Build and Publish RMManager Image / build (push) Successful in 56s
2026-10-31 09:11:39 -04:00
Lyncoln 75b4cc92da Repaired build workflow
Build and Publish RMManager Image / build (push) Successful in 46s
2026-10-30 23:41:42 -04:00
2 changed files with 73 additions and 8 deletions
+66 -8
View File
@@ -35,9 +35,10 @@ jobs:
fi
git checkout --detach FETCH_HEAD
git config --global --add safe.directory "$PWD"
# ---------------------------------------------
# Determine image tags
# Determine image version and commit SHA
# ---------------------------------------------
- name: Determine version
id: version
@@ -45,12 +46,13 @@ jobs:
set -euo pipefail
SHORT_SHA="$(git rev-parse --short=7 HEAD)"
echo "sha=$SHORT_SHA" >> "$GITHUB_OUTPUT"
if [ -f VERSION ]; then
VERSION="$(tr -d '[:space:]' < VERSION)"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
else
echo "version=" >> "$GITHUB_OUTPUT"
fi
# ---------------------------------------------
@@ -69,7 +71,7 @@ jobs:
--password-stdin
# ---------------------------------------------
# Build container image
# Build and export container image
# ---------------------------------------------
- name: Build RMManager image
env:
@@ -85,14 +87,62 @@ jobs:
-f Containerfile \
-t "$FULL_IMAGE:latest" \
-t "$FULL_IMAGE:sha-$SHORT_SHA" \
--output "type=docker,dest=$RUNNER_TEMP/rmmanager-built.tar" \
.
# ---------------------------------------------
# Load exported image into Docker
# ---------------------------------------------
- name: Load RMManager image
run: |
set -euo pipefail
docker load \
--input "$RUNNER_TEMP/rmmanager-built.tar"
# ---------------------------------------------
# Add optional version tag
# ---------------------------------------------
- name: Tag RMManager image
env:
REGISTRY: ${{ vars.REGISTRY }}
VERSION: ${{ steps.version.outputs.version }}
run: |
set -euo pipefail
FULL_IMAGE="$REGISTRY/david/rmmanager"
if [ -n "$VERSION" ]; then
docker tag "$FULL_IMAGE:latest" "$FULL_IMAGE:v$VERSION"
docker tag \
"$FULL_IMAGE:latest" \
"$FULL_IMAGE:v$VERSION"
fi
# ---------------------------------------------
# Publish image
# Verify local image and tags
# ---------------------------------------------
- name: Verify RMManager image
env:
REGISTRY: ${{ vars.REGISTRY }}
VERSION: ${{ steps.version.outputs.version }}
SHORT_SHA: ${{ steps.version.outputs.sha }}
run: |
set -euo pipefail
FULL_IMAGE="$REGISTRY/david/rmmanager"
docker version
docker image ls
docker image inspect "$FULL_IMAGE:latest"
docker image inspect "$FULL_IMAGE:sha-$SHORT_SHA"
if [ -n "$VERSION" ]; then
docker image inspect "$FULL_IMAGE:v$VERSION"
fi
# ---------------------------------------------
# Publish image to Gitea registry
# ---------------------------------------------
- name: Push RMManager image
env:
@@ -112,13 +162,21 @@ jobs:
fi
# ---------------------------------------------
# Summary
# Report successful build
# ---------------------------------------------
- name: Report build
env:
REGISTRY: ${{ vars.REGISTRY }}
VERSION: ${{ steps.version.outputs.version }}
SHORT_SHA: ${{ steps.version.outputs.sha }}
run: |
echo "RMManager build completed"
set -euo pipefail
echo "RMManager build and publish completed"
echo "Image: $REGISTRY/david/rmmanager"
echo "Commit: $SHORT_SHA"
echo "Latest tag: latest"
echo "Commit tag: sha-$SHORT_SHA"
if [ -n "$VERSION" ]; then
echo "Version tag: v$VERSION"
fi
+7
View File
@@ -15,6 +15,13 @@ port = int(os.environ.get("SERVER_PORT", 19001))
class RequestHandler(BaseHTTPRequestHandler):
def log_message(self, format, *args):
logging.info(
"%s - %s",
self.address_string(),
format % args
)
def do_POST(self):
logging.debug("POST request received")