overlay/update-base-image.sh
Jared Allard 09d39ad36d
feat(updater): add 'checkout' and 'upload_artifact' steps
Adds a new `checkout` step intended to replace `git checkout` by
actually checking out the correct revision when running commands.

Adds a new `upload_artifact` step that uploads an artifact to a package
specific prefix. Primarily intended for supporting Go dependency
archives, but could also be used for anything.

Added `net-vpn/tailscale` using this new functionality.
2024-05-10 12:42:43 -07:00

23 lines
485 B
Bash
Executable file

#!/usr/bin/env bash
# Rebuilds the base image used by the tools in this repository and
# pushes it upstream.
set -euo pipefail
# PUSH determines if we should push the image to the remote or not.
PUSH=false
if [[ "${1:-}" == "--push" ]]; then
PUSH=true
fi
args=(
"--tag" "ghcr.io/jaredallard/overlay:updater"
"$(pwd)"
)
if [[ "$PUSH" == "true" ]]; then
args+=("--platform" "linux/amd64,linux/arm64" "--push")
else
args+=("--load")
fi
exec docker buildx build "${args[@]}"