Skip to content

Commit

Permalink
ci(docker-build): add tailscale tool
Browse files Browse the repository at this point in the history
  • Loading branch information
vpayno committed Jan 12, 2024
1 parent 71d5e15 commit db08fd0
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/docker/layer-35.00-tools-tailscale.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/bin/bash
#
# .github/docker/layer-35.00-tools-tailscale.sh
#

set -o pipefail

# this path from for the container
# shellcheck disable=SC1091
. /.github/docker/include

# shellcheck disable=SC1091
source /.github/citools/includes/wrapper-library || exit

main() {
declare -i retval=0

layer_begin "${0}" "$@"

declare -a PACKAGES
PACKAGES=(
tailscale
)

echo Running: curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.noarmor.gpg \| sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg \>/dev/null
curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.noarmor.gpg | sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null || track_errors
printf "\n"

echo Running: curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.tailscale-keyring.list \| sudo tee /etc/apt/sources.list.d/tailscale.list
curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list || track_errors
printf "\n"

echo Running: apt update
time apt update || track_errors
printf "\n"

echo Running: apt install -y "${PACKAGES[@]}"
time apt install -y "${PACKAGES[@]}" || track_errors
printf "\n"

declare -a GO_PKGS
GO_PKGS=(
golang.zx2c4.com/wireguard@latest
)

declare url
for url in "${GO_PKGS[@]}"; do
go install "${url}" || track_errors
done

layer_end "${0}" "$@"

echo Running: return "${retval}"
return "${retval}"
}

time main "${@}" |& tee "${HOME}"/layer-35.00-tools-tailscale.log
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ RUN bash .github/docker/layer-17.00-exercism-ruby.sh ci-generic-debian && : 2023

RUN bash .github/docker/layer-25.00-tools-vscode.sh ci-generic-debian && : 20240102-000

RUN bash .github/docker/layer-35.00-tools-tailscale.sh ci-generic-debian && : 20240111-000

RUN bash .github/docker/layer-99.00-summary.sh ci-generic-debian && : 20231103-000

# Copies your code file from your action repository to the filesystem path `/` of the container
Expand Down

0 comments on commit db08fd0

Please sign in to comment.