mirror of
https://github.com/luxfi/evm.git
synced 2026-09-24 00:27:44 +00:00
* Remove specified git version to avoid downgrades breaking docker build * Add build docker image to unit test action * Update to use current branch instead of commit for docker image build * Update docker image script to push image if env var is set * Add new line to build image script * Update scripts/constants.sh Co-authored-by: Sam Batschelet <[email protected]> * Update docker login * Update build image action * Update gh action * checkout for docker image build * Set build image ID in gh action with github.ref_name * Separate CI and release * remove extra copy * Update name * Update variable used in build image id * Update set var * Update dockerhub repo * Revert dockerhub repo name chnge and use Subnet-EVM in tag name --------- Co-authored-by: Sam Batschelet <[email protected]>
25 lines
760 B
Bash
Executable File
25 lines
760 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -o errexit
|
|
set -o nounset
|
|
set -o pipefail
|
|
|
|
# Avalanche root directory
|
|
SUBNET_EVM_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )"; cd .. && pwd )
|
|
|
|
# Load the versions
|
|
source "$SUBNET_EVM_PATH"/scripts/versions.sh
|
|
|
|
# Load the constants
|
|
source "$SUBNET_EVM_PATH"/scripts/constants.sh
|
|
|
|
echo "Building Docker Image: $DOCKERHUB_REPO:$BUILD_IMAGE_ID based of $AVALANCHEGO_VERSION"
|
|
docker build -t "$DOCKERHUB_REPO:$BUILD_IMAGE_ID" "$SUBNET_EVM_PATH" -f "$SUBNET_EVM_PATH/Dockerfile" \
|
|
--build-arg AVALANCHE_VERSION="$AVALANCHEGO_VERSION" \
|
|
--build-arg SUBNET_EVM_COMMIT="$SUBNET_EVM_COMMIT" \
|
|
--build-arg CURRENT_BRANCH="$CURRENT_BRANCH"
|
|
|
|
if [[ ${PUSH_DOCKER_IMAGE:-""} == "true" ]]; then
|
|
docker push $DOCKERHUB_REPO:$BUILD_IMAGE_ID
|
|
fi
|