Skip to content

Commit a2769f7

Browse files
committed
Add mfinelli/setup-imagemagick@v6 to CI
GitHub Action ubuntu image no longer have ImageMagick installed: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md
1 parent b71c8d6 commit a2769f7

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.github/workflows/main.yml

+6
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ jobs:
4242
id: pages
4343
uses: actions/configure-pages@v5
4444

45+
- name: Setup ImageMagick
46+
uses: mfinelli/setup-imagemagick@v6
47+
with:
48+
cache: true
49+
install-libfuse2: true
50+
4551
- name: Get resvg sha
4652
id: get-resvg-sha
4753
env:

gen-icon.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ if [[ resvg -ne 0 ]]; then
8383
exit 1
8484
fi
8585

86-
command -v convert > /dev/null; magick=$?
86+
command -v magick > /dev/null; magick=$?
8787

8888
if [[ magick -ne 0 ]]; then
89-
echo "Cannot find 'convert' command. Make sure ImageMagick is installed and reachable from the current working directory. See: https://www.imagemagick.org" >&2
89+
echo "Cannot find 'magick' command. Make sure ImageMagick is installed and reachable from the current working directory. See: https://www.imagemagick.org" >&2
9090
exit 1
9191
fi
9292

@@ -143,12 +143,12 @@ for f in "$@"; do
143143

144144
if (( ${#pngs[@]} > 0 )); then
145145
ico="$name.g.ico"
146-
convert -background none "${pngs[@]}" "$ico"
146+
magick -background none "${pngs[@]}" "$ico"
147147
fi
148148

149149
if (( apple != 0 )); then
150150
if wait -n "$apple_job"; then
151-
convert "$apple_icon" -define png:exclude-chunks=date,time -background white -gravity center -extent "${apple_touch_icon_size}x${apple_touch_icon_size}" "$apple_icon"
151+
magick "$apple_icon" -define png:exclude-chunks=date,time -background white -gravity center -extent "${apple_touch_icon_size}x${apple_touch_icon_size}" "$apple_icon"
152152
else
153153
status=1
154154
fi

0 commit comments

Comments
 (0)