Home / Articles

Installing ImageMagick on Ubuntu-based GitHub-hosted runner

2022-03-12T08:19:49.180Z.

When using Ubuntu-based (20.04) GitHub-hosted runner, ImageMagick 6 can be installed using the apt program. In order to install ImageMagick 7, there are 2 options:

This article describes the steps of installing the pre-built release (AppImage) for use in the runner.

Install ImageMagick

The pre-built binary release can be downloaded and run directly. To use the installed ImageMagick in the runner, the PATH environment variable has to be updated. Add the following steps to the workflow file:


- name: Install dependencies
  run: |
    mkdir -p "$HOME/.local/bin"
    curl -O 'https://download.imagemagick.org/ImageMagick/download/binaries/magick'
    chmod u+x magick
    mv magick "$HOME/.local/bin"
    echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Check dependencies
  run: magick -version

The first step downloads the pre-built release (AppImage), changes the file permission such that it can be executed, and updates the PATH environment variable. The second step runs ImageMagick by executing the magick command. If ImageMagick has been installed successfully, the GitHub Actions log should show output similar to the following:


Version: ImageMagick 7.1.0-26 Q16-HDRI x86_64 2022-02-19 https://imagemagick.org
Copyright: (C) 1999-2021 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP(4.5)
Delegates (built-in): bzlib djvu fontconfig freetype jbig jng jpeg lcms lqr lzma openexr png raqm tiff webp x xml zlib
Compiler: gcc (7.5)

References