File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -12,20 +12,24 @@ inputs:
12
12
install-dir :
13
13
description : ' Where to install the fatt binary'
14
14
required : false
15
- default : ' $HOME/.fatt/bin'
15
+ default : " $HOME/.fatt/bin"
16
16
runs :
17
17
using : ' composite'
18
18
steps :
19
+ # To expand the $HOME environment variable when setting the INSTALL_PATH variable
20
+ # this way of adding to the GITHUB_ENV is required. Via yaml syntax 'env: …' will
21
+ # not work and result in a relative install-dir like
22
+ # /home/runner/work/slsa-workflow-examples/slsa-workflow-examples/$HOME/.fatt/bin.
23
+ # where you would expect /home/runner/.fatt/bin
24
+ - shell : bash
25
+ run : echo "INSTALL_PATH=${{ inputs.install-dir }}" >> $GITHUB_ENV
19
26
- shell : bash
20
27
run : $GITHUB_ACTION_PATH/install.sh
21
28
env :
22
29
VERSION : ${{ inputs.fatt-release }}
23
- INSTALL_PATH : ${{ inputs.install-dir }}
24
30
- if : ${{ runner.os == 'Linux' || runner.os == 'macOS' }}
25
- run : |
26
- echo "${{ inputs.install-dir }}" >> $GITHUB_PATH
27
- echo "binary installed at $(command -v fatt)"
31
+ run : echo "${{ inputs.install-dir }}" >> $GITHUB_PATH
28
32
shell : bash
29
33
- if : ${{ runner.os == 'Windows' }}
30
- run : echo "${{ inputs.install-dir }}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
34
+ run : echo "${{ inputs.install-dir }}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
31
35
shell : pwsh
Original file line number Diff line number Diff line change 17
17
GITHUB_API=${GITHUB_API:- ' https://api.github.com' }
18
18
19
19
# default to relative path if INSTALL_PATH is not set
20
- INSTALL_PATH=${INSTALL_PATH:- ./ .fatt/ bin}
20
+ # INSTALL_PATH=${INSTALL_PATH:-./.fatt/bin}
21
21
mkdir -p " ${INSTALL_PATH} "
22
- INSTALL_PATH=" $( realpath " ${INSTALL_PATH} " ) "
22
+ # INSTALL_PATH="$(realpath "${INSTALL_PATH}")"
23
23
24
24
VERSION=" ${VERSION:- v0.2.0-rc} "
25
25
RELEASE=" https://github.com/philips-labs/fatt/releases/download/${VERSION} "
@@ -81,7 +81,7 @@ DOWNLOAD="${RELEASE}/${ARCHIVE}"
81
81
log_info " Installing ${BINARY} (${OS} /${ARCH} ) at ${INSTALL_PATH} "
82
82
83
83
trap " popd >/dev/null" EXIT
84
- pushd " $INSTALL_PATH " > /dev/null || exit
84
+ pushd " ${ INSTALL_PATH} " || exit
85
85
86
86
download " ${ARCHIVE} " " ${DOWNLOAD} "
87
87
You can’t perform that action at this time.
0 commit comments