mirror of
https://github.com/dagger/dagger-for-github.git
synced 2026-01-04 13:59:57 +11:00
feat: check for pre-installed dagger
Signed-off-by: Jeremy Adams <jeremy@dagger.io>
This commit is contained in:
parent
94664ad0b8
commit
909500b43c
1 changed files with 11 additions and 3 deletions
14
action.yml
14
action.yml
|
|
@ -69,9 +69,17 @@ runs:
|
||||||
|
|
||||||
COMMIT=${{ inputs.commit }}
|
COMMIT=${{ inputs.commit }}
|
||||||
|
|
||||||
# The install.sh script creates path ${prefix_dir}/bin
|
if [[ -x "$(command -v dagger)" ]]; then
|
||||||
curl -fsS https://dl.dagger.io/dagger/install.sh \
|
pre-installed-version="$(dagger --silent version | cut --fields 2 --delimiter ' ')"
|
||||||
| BIN_DIR=${prefix_dir}/bin DAGGER_VERSION="$VERSION" DAGGER_COMMIT="$COMMIT" sh
|
if [[ "$pre-installed-version" != "$DAGGER_VERSION" ]]; then
|
||||||
|
echo "dagger ${pre-installed-version} is installed, but needed ${DAGGER_VERSION}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# The install.sh script creates path ${prefix_dir}/bin
|
||||||
|
curl -fsS https://dl.dagger.io/dagger/install.sh \
|
||||||
|
| BIN_DIR=${prefix_dir}/bin DAGGER_VERSION="$VERSION" DAGGER_COMMIT="$COMMIT" sh
|
||||||
|
fi
|
||||||
|
|
||||||
- id: exec
|
- id: exec
|
||||||
if: inputs.call != '' || inputs.args != ''
|
if: inputs.call != '' || inputs.args != ''
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue