Skip to content

Commit a95b81b

Browse files
committed
fix: resolve GitHub Actions pipeline errors
- Fix Dockerfile syntax version (1.20 -> 1.4) for better compatibility - Remove unused BUILD_TYPE ARG and final stage - Fix shellcheck warnings in shell scripts: - Add set -e to build-images script - Quote all variables properly - Use POSIX-compliant arithmetic syntax in test-performance - Ensure all scripts pass shellcheck validation
1 parent 03e1cb0 commit a95b81b

File tree

3 files changed

+15
-17
lines changed

3 files changed

+15
-17
lines changed

Dockerfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
#syntax=docker/dockerfile:1.20
1+
#syntax=docker/dockerfile:1.4
22
# Dockerfile for Magento FrankenPHP
3-
# Supports base and dev build targets via BUILD_TYPE ARG
3+
# Supports base and dev build targets
44
#
55
# Build examples:
6-
# docker build --build-arg BUILD_TYPE=base -t magento-frankenphp:base .
7-
# docker build --build-arg BUILD_TYPE=dev -t magento-frankenphp:dev .
6+
# docker build --target base -t magento-frankenphp:base .
7+
# docker build --target dev -t magento-frankenphp:dev .
88

99
ARG PHP_VERSION=8.4
1010
ARG FRANKENPHP_VERSION=1.10.1
11-
ARG BUILD_TYPE=base
1211

1312
FROM dunglas/frankenphp:${FRANKENPHP_VERSION}-php${PHP_VERSION} AS base
1413
LABEL maintainer="Mohamed El Mrabet <contact@cleatsquad.dev>"
@@ -118,5 +117,3 @@ ENV SENDMAIL_PATH=/usr/local/bin/mhsendmail \
118117
XDEBUG_CLIENT_PORT=9003 \
119118
XDEBUG_START_WITH_REQUEST=trigger \
120119
XDEBUG_IDEKEY=PHPSTORM
121-
122-
FROM ${BUILD_TYPE} AS final

bin/build-images

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
set -e
23

34
IMAGE="mohelmrabet/magento-frankenphp"
45
VERSIONS="8.2 8.3 8.4"
@@ -39,18 +40,18 @@ push_all() {
3940

4041
push_latest() {
4142
echo "📤 Pushing latest tags..."
42-
docker tag ${IMAGE}:php8.4-fp${FP}-base ${IMAGE}:latest
43-
docker tag ${IMAGE}:php8.4-fp${FP}-base ${IMAGE}:base
44-
docker tag ${IMAGE}:php8.4-fp${FP}-dev ${IMAGE}:dev
45-
docker push ${IMAGE}:latest
46-
docker push ${IMAGE}:base
47-
docker push ${IMAGE}:dev
43+
docker tag "${IMAGE}:php8.4-fp${FP}-base" "${IMAGE}:latest"
44+
docker tag "${IMAGE}:php8.4-fp${FP}-base" "${IMAGE}:base"
45+
docker tag "${IMAGE}:php8.4-fp${FP}-dev" "${IMAGE}:dev"
46+
docker push "${IMAGE}:latest"
47+
docker push "${IMAGE}:base"
48+
docker push "${IMAGE}:dev"
4849
echo "✅ Latest tags pushed!"
4950
}
5051

5152
list_images() {
5253
echo "📦 Local images:"
53-
docker images | grep ${IMAGE}
54+
docker images | grep "${IMAGE}"
5455
}
5556

5657
push_readme() {

bin/test-performance

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ PASSED=0
2222
FAILED=0
2323

2424
test_result() {
25-
if [ $1 -eq 0 ]; then
25+
if [ "$1" -eq 0 ]; then
2626
echo -e "${GREEN}✓ PASS${NC}: $2"
27-
((PASSED++))
27+
PASSED=$((PASSED + 1))
2828
else
2929
echo -e "${RED}✗ FAIL${NC}: $2"
30-
((FAILED++))
30+
FAILED=$((FAILED + 1))
3131
fi
3232
}
3333

0 commit comments

Comments
 (0)