Skip to content

Commit fd6ceac

Browse files
committed
Rename installer and keep it in the final images
1 parent 400e53e commit fd6ceac

File tree

4 files changed

+17
-23
lines changed

4 files changed

+17
-23
lines changed

.github/workflows/create-images.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ jobs:
9797
name: Inspect container environment
9898
id: inspect
9999
run: |
100-
if docker exec -t imagine-${{ matrix.php-version }} /installer.sh support-avif; then
100+
if docker exec -t imagine-${{ matrix.php-version }} imagine-install support-avif; then
101101
echo 'AVIF is supported'
102102
AVIF_SUPPORT=yes
103103
else
104104
AVIF_SUPPORT=no
105105
fi
106-
if docker exec -t imagine-${{ matrix.php-version }} /installer.sh support-heic; then
106+
if docker exec -t imagine-${{ matrix.php-version }} imagine-install support-heic; then
107107
echo 'HEIC is supported'
108108
HEIC_SUPPORT=yes
109109
else
@@ -113,31 +113,31 @@ jobs:
113113
echo "::set-output name=heic-support::$HEIC_SUPPORT"
114114
-
115115
name: Install git
116-
run: docker exec -t imagine-${{ matrix.php-version }} /installer.sh git $GIT_VERSION
116+
run: docker exec -t imagine-${{ matrix.php-version }} imagine-install git $GIT_VERSION
117117
-
118118
name: Install libaom ${{ env.LIBAOM_VERSION }}
119119
if: ${{ steps.inspect.outputs.avif-support == 'yes' || steps.inspect.outputs.heic-support == 'yes' }}
120-
run: docker exec -t imagine-${{ matrix.php-version }} /installer.sh libaom $LIBAOM_VERSION
120+
run: docker exec -t imagine-${{ matrix.php-version }} imagine-install libaom $LIBAOM_VERSION
121121
-
122122
name: Install libdav1d ${{ env.LIBDAV1D_VERSION }}
123123
if: ${{ steps.inspect.outputs.avif-support == 'yes' }}
124-
run: docker exec -t imagine-${{ matrix.php-version }} /installer.sh libdav1d $LIBDAV1D_VERSION
124+
run: docker exec -t imagine-${{ matrix.php-version }} imagine-install libdav1d $LIBDAV1D_VERSION
125125
-
126126
name: Install libyuv
127127
if: ${{ steps.inspect.outputs.avif-support == 'yes' || steps.inspect.outputs.heic-support == 'yes' }}
128-
run: docker exec -t imagine-${{ matrix.php-version }} /installer.sh libyuv
128+
run: docker exec -t imagine-${{ matrix.php-version }} imagine-install libyuv
129129
-
130130
name: Install libavif ${{ env.LIBAVIF_VERSION }}
131131
if: ${{ steps.inspect.outputs.avif-support == 'yes' }}
132-
run: docker exec -t imagine-${{ matrix.php-version }} /installer.sh libavif $LIBAVIF_VERSION
132+
run: docker exec -t imagine-${{ matrix.php-version }} imagine-install libavif $LIBAVIF_VERSION
133133
-
134134
name: Install libde265 ${{ env.LIBDE265_VERSION }}
135135
if: ${{ steps.inspect.outputs.heic-support == 'yes' }}
136-
run: docker exec -t imagine-${{ matrix.php-version }} /installer.sh libde265 $LIBDE265_VERSION
136+
run: docker exec -t imagine-${{ matrix.php-version }} imagine-install libde265 $LIBDE265_VERSION
137137
-
138138
name: Install libheif ${{ env.LIBHEIF_VERSION }}
139139
if: ${{ steps.inspect.outputs.heic-support == 'yes' }}
140-
run: docker exec -t imagine-${{ matrix.php-version }} /installer.sh libheif $LIBHEIF_VERSION
140+
run: docker exec -t imagine-${{ matrix.php-version }} imagine-install libheif $LIBHEIF_VERSION
141141
-
142142
name: Install Composer
143143
run: docker exec -t -e IPE_KEEP_SYSPKG_CACHE=1 imagine-${{ matrix.php-version }} install-php-extensions @composer-2
@@ -149,7 +149,7 @@ jobs:
149149
run: docker exec -t imagine-${{ matrix.php-version }} php --ri exif
150150
-
151151
name: Cleanup
152-
run: docker exec -t imagine-${{ matrix.php-version }} /installer.sh cleanup
152+
run: docker exec -t imagine-${{ matrix.php-version }} imagine-install cleanup
153153
-
154154
name: Check container
155155
run: docker container ls -s --filter name=imagine-${{ matrix.php-version }}
@@ -251,7 +251,7 @@ jobs:
251251
-
252252
name: Install GraphicsMagic
253253
if: ${{ contains(format('-{0}-', matrix.extensions), '-gmagick-') }}
254-
run: docker exec -t imagine-${{ matrix.config.php-version }}-${{ matrix.extensions }} /installer.sh graphicsmagick ${{ matrix.config.graphicsmagic-version }}
254+
run: docker exec -t imagine-${{ matrix.config.php-version }}-${{ matrix.extensions }} imagine-install graphicsmagick ${{ matrix.config.graphicsmagic-version }}
255255
-
256256
name: Install gmagick PHP extension
257257
if: ${{ contains(format('-{0}-', matrix.extensions), '-gmagick-') }}
@@ -263,7 +263,7 @@ jobs:
263263
-
264264
name: Install ImageMagick
265265
if: ${{ contains(format('-{0}-', matrix.extensions), '-imagick-') }}
266-
run: docker exec -t imagine-${{ matrix.config.php-version }}-${{ matrix.extensions }} /installer.sh imagemagick ${{ matrix.config.imagemagick-version }}
266+
run: docker exec -t imagine-${{ matrix.config.php-version }}-${{ matrix.extensions }} imagine-install imagemagick ${{ matrix.config.imagemagick-version }}
267267
-
268268
name: Install imagick PHP extension
269269
if: ${{ contains(format('-{0}-', matrix.extensions), '-imagick-') }}
@@ -281,8 +281,8 @@ jobs:
281281
if: ${{ contains(format('-{0}-', matrix.extensions), '-gd-') }}
282282
run: docker exec -t imagine-${{ matrix.config.php-version }}-${{ matrix.extensions }} php --ri gd
283283
-
284-
name: Final cleanup
285-
run: docker exec -t imagine-${{ matrix.config.php-version }}-${{ matrix.extensions }} /installer.sh final-cleanup
284+
name: Cleanup
285+
run: docker exec -t imagine-${{ matrix.config.php-version }}-${{ matrix.extensions }} imagine-install cleanup
286286
-
287287
name: Check container
288288
run: docker container ls -s --filter name=imagine-${{ matrix.config.php-version }}-${{ matrix.extensions }}

docker/Dockerfile.base

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ FROM php:${PHP_VERSION}${PHP_VERSION_DOCKERSUFFIX}-cli
99

1010
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
1111

12-
COPY utilities.sh /
12+
COPY imagine-utilities /usr/local/bin/
1313

14-
COPY installer.sh /
14+
COPY imagine-install /usr/local/bin/
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -o nounset
44
set -o errexit
55

6-
. "$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)/utilities.sh"
6+
. "$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)/imagine-utilities"
77

88
# Install git.
99
# If it's too old to be used in GitHub Actions we'll build it.
@@ -410,15 +410,9 @@ case "$1" in
410410
installImagemagick "$2"
411411
;;
412412
cleanup)
413-
uninstallAptDevPackages
414-
rm -rf /var/lib/apt/lists/*
415-
;;
416-
final-cleanup)
417413
uninstallAptDevPackages
418414
rm -rf /var/lib/apt/lists/*
419415
rm -rf /tmp/*
420-
unlink "$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)/utilities.sh"
421-
unlink "$0"
422416
;;
423417
*)
424418
printf 'Unrecognized command: "%s"\n' "$1">&2

0 commit comments

Comments
 (0)