File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 3434machine_id_file=" $( mktemp) "
3535< /dev/urandom tr -dc ' a-zA-Z0-9' | fold -w 32 | head -n 1 > " ${machine_id_file} "
3636
37+ cmake_version=" ${CMAKE_VERSION:- " 3.31.6" } "
38+ cmake_url=" ${CMAKE_URL:- " https://github.com/Kitware/CMake/releases/download" } "
39+ cmake_home=" /opt/cmake"
40+
3741exit_code=0
3842# Run the action we want on it but using an in-container build directory to prevent various permissions errors and files locally
3943" $CONTAINER_RUNTIME " run --rm -t -w " /tmp/source" -v " ${SOURCE_DIR} :/source:ro" \
@@ -44,6 +48,18 @@ exit_code=0
4448 -e INPUT_PRE_COMMAND=" cp -R /source /tmp" \
4549 -e INPUT_WORKING-DIRECTORY=" /tmp/source" \
4650 lpenz/ghaction-cmake:0.19 \
51+ sh -c " \
52+ cmake_install_script=\"\$ (mktemp --suffix '.sh')\" && \
53+ cmake_download_url=$( printf " %q" " ${cmake_url} /v${cmake_version} /cmake-${cmake_version} " ) \" -linux-\$ (uname -m).sh\" && \
54+ echo \" Downloading CMake: \$ {cmake_download_url} -> \$ {cmake_install_script}\" && \
55+ curl -jksSL -o \"\$ {cmake_install_script}\" \"\$ {cmake_download_url}\" && \
56+ mkdir -p $( printf " %q" " ${cmake_home} " ) && \
57+ echo \" Installing CMake: \$ {cmake_install_script} -> \" $( printf " %q" " ${cmake_home} " ) && \
58+ sh \"\$ {cmake_install_script}\" --skip-license --exclude-subdir --prefix=$( printf " %q" " ${cmake_home} " ) && \
59+ rm -f \"\$ {cmake_install_script}\" && \
60+ export PATH=\" $( printf " %q" " ${cmake_home} /bin" ) :\$ {PATH}\" && \
61+ cmake --version && \
62+ entrypoint" \
4763 || exit_code=$?
4864
4965rm -f " ${machine_id_file} "
You can’t perform that action at this time.
0 commit comments