@@ -26,6 +26,9 @@ inputs:
26
26
required : false
27
27
description : " EXPERIMENTAL: Installation method of the Preevy CLI. Supported values: npm, gh-release or none"
28
28
default : npm
29
+ working-directory :
30
+ required : false
31
+ description : " Working directory where the preevy CLI will run"
29
32
outputs : {}
30
33
runs :
31
34
using : " composite"
47
50
function os_suffix() {
48
51
case "${{ runner.os }}" in
49
52
"Linux") echo -n "linux";;
50
- "Windows") echo -n "win ";;
51
- "macOS") echo -n "macos ";;
53
+ "Windows") echo -n "win32 ";;
54
+ "macOS") echo -n "darwin ";;
52
55
*) echo "No release for OS ${{ runner.os }}" 1>&2; exit 1;;
53
56
esac
54
57
}
@@ -63,16 +66,18 @@ runs:
63
66
64
67
release_version='${{ inputs.version }}'
65
68
if [[ "${{ inputs.version }}" == "latest" ]]; then
66
- release_version=$(curl -s https://api.github.com/repos/livecycle/preevy/releases/latest | jq -r .tag_name)
69
+ release_version=$(curl -sfL --retry-connrefused --retry 3 https://api.github.com/repos/livecycle/preevy/releases/latest | jq -r .tag_name)
67
70
fi
68
71
69
- release_file="preevy-$(os_suffix)-$(arch_suffix).tar"
72
+ release_file="preevy-${release_version}-$ (os_suffix)-$(arch_suffix).tar.gz "
70
73
release_url="https://github.com/livecycle/preevy/releases/download/${release_version}/${release_file}"
71
74
72
- wget -q "${release_url}" -O - | sudo tar -x -C /usr/local/bin
75
+ curl -sfZL --retry-connrefused --retry 3 "${release_url}" | sudo tar -zx -C /usr/local/lib
76
+ sudo ln -s /usr/local/lib/preevy/bin/preevy /usr/local/bin/preevy
73
77
74
78
- name : Run Preevy
75
79
shell : bash
80
+ working-directory : ${{ inputs.working-directory }}
76
81
id : run_preevy
77
82
run : |
78
83
if [[ ! -z "${{ inputs.docker-compose-yaml-paths }}" ]]; then
0 commit comments