Files
hub-monorepo/scripts/publish-image.sh
Shane da Silva aebbb47b3c chore: Automate Docker Hub publishing (#1138)
Set up automation so that when we push the `@farcaster/hubble@X.Y.Z` tag
we will automatically kick off a Docker build and push the resulting
image layers + tag to Docker Hub.
2023-07-14 21:18:21 -04:00

21 lines
630 B
Bash
Executable File

#!/bin/bash
# Builds and publishes image to Docker Hub.
# This is intended to be run by our GitHub Actions workflow.
#
# MUST be run from the root of the repository so the Docker build context is correct.
#
# You must `docker login ...` first so that we have the necessary permissions to
# push the image layers + tags to Docker Hub.
HUBBLE_VERSION=$(node -e "console.log(require('./apps/hubble/package.json').version);")
echo "Publishing $HUBBLE_VERSION"
depot build -f Dockerfile.hubble \
--platform "linux/amd64,linux/arm64" \
--push \
-t farcasterxyz/hubble:${HUBBLE_VERSION} \
-t farcasterxyz/hubble:latest \
.