github.com/hernad/nomad@v1.6.112/.github/actions/install-vault/action.yml (about)

     1  # Copyright (c) HashiCorp, Inc.
     2  # SPDX-License-Identifier: MPL-2.0
     3  
     4  name: install-vault
     5  inputs:
     6    version:
     7      required: false
     8      default: 1.2.4
     9  runs:
    10    using: composite
    11    steps:
    12    - name: Install Vault
    13      run: |-
    14        set -x
    15  
    16        case "${OSTYPE}" in
    17          linux*)  os="linux" ;;
    18          darwin*) os="darwin" ;;
    19          msys*)   os="windows" ;;
    20          *)       echo "unknown os: ${OSTYPE}"; exit 1 ;;
    21        esac
    22  
    23        curl -SL --fail -o /tmp/vault.zip https://releases.hashicorp.com/vault/"${{ inputs.version }}"/vault_"${{ inputs.version }}"_"${os}"_amd64.zip
    24  
    25        if [[ "${os}" != "windows" ]]; then
    26          sudo unzip -d /usr/local/bin /tmp/vault.zip
    27          rm -rf /tmp/vault*
    28        else
    29          rm -rf c:\Windows\vault.exe
    30          unzip /tmp/vault.zip -d "/c/Windows"
    31          rm -rf /tmp/vault*
    32        fi
    33      shell: bash