diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index fd45a8820..d9271a95e 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -29,6 +29,8 @@ jobs: ${{ runner.os }}-gems- - name: Setup environment + env: + CI_WORKFLOW: PR_BUILD run: source ci_scripts/ci_common.sh && setup_github_actions_environment diff --git a/ci_scripts/ci_common.sh b/ci_scripts/ci_common.sh index 685e52e0b..c6e9c6b68 100755 --- a/ci_scripts/ci_common.sh +++ b/ci_scripts/ci_common.sh @@ -41,7 +41,11 @@ setup_github_actions_environment() { unset HOMEBREW_NO_INSTALL_FROM_API export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 - brew update && brew install xcodegen swiftformat git-lfs imagemagick a7ex/homebrew-formulae/xcresultparser + brew update && brew install xcodegen swiftformat git-lfs a7ex/homebrew-formulae/xcresultparser + + if [ "$CI_WORKFLOW" = "PR_BUILD" ]; then + brew install imagemagick + fi # brew "swiftlint" # Fails on the CI: `Target /usr/local/bin/swiftlint Target /usr/local/bin/swiftlint already exists`. Installed through https://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-Readme.md#linters