mirror of
https://github.com/juspay/hyperswitch.git
synced 2026-03-26 22:28:26 +00:00
Co-authored-by: hrithikesh026 <hrithikesh.vm@juspay.in> Co-authored-by: Prajjwal Kumar <prajjwal.kumar@juspay.in> Co-authored-by: Sanchith Hegde <sanchith.hegde@juspay.in> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
34 lines
772 B
Bash
Executable File
34 lines
772 B
Bash
Executable File
#! /usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
if [[ "${CI:-false}" != "true" && "${GITHUB_ACTIONS:-false}" != "true" ]]; then
|
|
echo "This script is to be run in a GitHub Actions runner only. Exiting."
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p ~/.local/bin
|
|
|
|
if [[ "${RUNNER_OS}" == 'Linux' && "${RUNNER_ARCH}" == 'X64' ]]; then
|
|
JQ_ARCH='amd64'
|
|
elif [[ "${RUNNER_OS}" == 'Linux' && "${RUNNER_ARCH}" == 'ARM64' ]]; then
|
|
JQ_ARCH='arm64'
|
|
else
|
|
echo "::error::Unsupported runner OS or architecture"
|
|
exit 1
|
|
fi
|
|
|
|
# Download latest `jq` binary
|
|
curl \
|
|
--fail \
|
|
--silent \
|
|
--show-error \
|
|
--location \
|
|
--output ~/.local/bin/jq \
|
|
"https://github.com/jqlang/jq/releases/latest/download/jq-linux-${JQ_ARCH}"
|
|
|
|
chmod +x ~/.local/bin/jq
|
|
|
|
# Update PATH
|
|
echo "$HOME/.local/bin" >> "${GITHUB_PATH}"
|