Install prebuilt ImageMagick binaries from jksy/imagemagick-build releases.
- uses: jksy/setup-imagemagick@v2
with:
version: "7.1.2-34-20261028"version(required) — a release tag of jksy/imagemagick-build without the leadingv:7.1.2-34(first build) or7.1.2-34-20261028(rebuild). Releases are immutable, so pin the dated tag to pick up rebuilds. See jksy/imagemagick-build: Release naming and the releases page for available versions.install-prefix(default:${{ runner.temp }}/imagemagick)add-to-path(default:true)export-env(default:true)github-token(default:${{ github.token }}) — used for GitHub API calls, to avoid the unauthenticated rate limitverify-attestation(default:true) — verify the build provenance attestation of the release asset before installing it. Requires theghCLI (preinstalled on GitHub-hosted runners), but no extra permissionsfail-if-missing— deprecated and ignored; a missing release asset always fails. Setting it prints a warning, and it will be removed in a future release
prefixbin-dirlib-dirpkg-config-pathmagick-pathattestation-verified—truewhen the attestation was verified, otherwisefalse
- Fetches
install.shof jksy/imagemagick-build at the release tagv<version>and runs it. The installer detects the OS / architecture, downloads the release asset, verifies its attestation (whenverify-attestationistrue) and extracts it- Supported targets are those of the installer: Ubuntu 22.04 / 24.04 / 26.04 and Amazon Linux 2023 / 2027,
x86_64/aarch64 - The installer runs with
sudowhen available, so that it can install missing runtime packages
- Supported targets are those of the installer: Ubuntu 22.04 / 24.04 / 26.04 and Amazon Linux 2023 / 2027,
- Copies the result into
install-prefixand rewriteslib/pkgconfig/*.pcto point at it - Logs dynamic-link (
ldd) check forlibMagickCore*.so* - Installs
ghostscript(whengsis missing) for PDF conversion support - Exports:
PATH=<prefix>/bin:$PATH(whenadd-to-path=true)PKG_CONFIG_PATH=<prefix>/lib/pkgconfig:$PKG_CONFIG_PATH(whenexport-env=true)LD_LIBRARY_PATH=<prefix>/lib:$LD_LIBRARY_PATH(whenexport-env=true)
The installer is taken from the requested tag, so older tags run older installers.
- Tags whose installer cannot verify attestations install without verification. A warning is printed and
attestation-verifiedisfalse - Tags without an installer that supports
IMAGEMAGICK_VERSIONandIMAGEMAGICK_INSTALL_BASE(including tags with noinstall.sh, such as7.1.2-18-20260405) fail. Usejksy/setup-imagemagick@v1for them
- Releases are installed by the installer of jksy/imagemagick-build instead of a separate implementation
verify-attestationis on by default. In containers withoutgh, installghor setverify-attestation: falsegithub-tokendefaults to${{ github.token }}fail-if-missingis ignored
This repository includes .github/workflows/test.yml, which validates:
- the attestation of the latest release is verified
magick -versionmagick -list format | grep -E "JPEG|PNG|WEBP|AVIF"- image export to
JPG/WEBP/AVIF gsavailability and PDF (input.pdf) to PNG conversionpkg-config --modversion MagickCore- RMagick installation and load:
bundle initgem "rmagick"inGemfilebundle installruby -e 'require "rmagick"; puts Magick::Magick_version'- PDF (
input-rmagick.pdf) to PNG conversion via RMagick
- run: magick -version
- run: magick -list format | grep -E "JPEG|PNG|WEBP|AVIF"
- run: pkg-config --modversion MagickCore
- run: |
bundle init
echo 'gem "rmagick"' >> Gemfile
bundle install
ruby -e 'require "rmagick"; puts Magick::Magick_version'