mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
namely, these workflows: test-e2e, test-ui, and test-windows extra-curricularly, as part of the overall migration effort company-wide, this also includes some standardization such as: * explicit permissions:read on various workflows * pinned action version shas (per https://github.com/hashicorp/security-public-tsccr) * actionlint, which among other things runs shellcheck on GHA run steps Co-authored-by: emilymianeil <eneil@hashicorp.com> Co-authored-by: Daniel Kimsey <daniel.kimsey@hashicorp.com>
34 lines
836 B
YAML
34 lines
836 B
YAML
# Copyright (c) HashiCorp, Inc.
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
name: install-vault
|
|
inputs:
|
|
version:
|
|
required: false
|
|
default: 1.2.4
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Install Vault
|
|
run: |-
|
|
set -x
|
|
|
|
case "${OSTYPE}" in
|
|
linux*) os="linux" ;;
|
|
darwin*) os="darwin" ;;
|
|
msys*) os="windows" ;;
|
|
*) echo "unknown os: ${OSTYPE}"; exit 1 ;;
|
|
esac
|
|
|
|
curl -SL --fail -o /tmp/vault.zip https://releases.hashicorp.com/vault/"${{ inputs.version }}"/vault_"${{ inputs.version }}"_"${os}"_amd64.zip
|
|
|
|
if [[ "${os}" != "windows" ]]; then
|
|
sudo unzip -d /usr/local/bin /tmp/vault.zip
|
|
rm -rf /tmp/vault*
|
|
else
|
|
rm -rf c:\Windows\vault.exe
|
|
unzip /tmp/vault.zip -d "/c/Windows"
|
|
rm -rf /tmp/vault*
|
|
fi
|
|
shell: bash
|