mirror of
https://github.com/repo-runner/debian-node.git
synced 2024-11-09 14:20:04 +00:00
25 lines
653 B
Bash
25 lines
653 B
Bash
|
#!/bin/bash
|
||
|
set -euxo pipefail
|
||
|
|
||
|
export DEBIAN_FRONTEND=noninteractive
|
||
|
|
||
|
# Install required utils
|
||
|
apt-get update
|
||
|
apt-get install -y --no-install-recommends \
|
||
|
apt-transport-https \
|
||
|
ca-certificates \
|
||
|
curl \
|
||
|
git \
|
||
|
jq \
|
||
|
make
|
||
|
|
||
|
# Download latest release of inner-runner
|
||
|
DOWNLOAD=$(curl -sSfL https://api.github.com/repos/repo-runner/repo-runner/releases/latest |
|
||
|
jq -r '.assets | .[] | select(.name == "inner-runner_linux_amd64.tar.gz") | .browser_download_url')
|
||
|
curl -sSfL "${DOWNLOAD}" | tar -xzf - -C /usr/local/bin
|
||
|
mv /usr/local/bin/inner-runner* /usr/local/bin/inner-runner
|
||
|
|
||
|
# Cleanup
|
||
|
apt-get autoremove --purge -y
|
||
|
rm -rf /var/lib/apt/lists/*
|