-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1671 from skalenetwork/develop
New beta (publish docker image hotfix)
- Loading branch information
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM node:18 | ||
|
||
RUN mkdir /app | ||
|
||
COPY VERSION /app | ||
COPY proxy /app | ||
|
||
WORKDIR /app | ||
|
||
RUN yarn install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env bash | ||
set -ea | ||
|
||
if [ -z "$VERSION" ] | ||
then | ||
echo "No VERSION provided, exiting" | ||
exit 1 | ||
fi | ||
|
||
NAME=ima-contracts | ||
REPO_NAME=skalenetwork/$NAME | ||
IMAGE_NAME=$REPO_NAME:$VERSION | ||
LATEST_IMAGE_NAME=$REPO_NAME:latest | ||
|
||
if [ -z "$SKIP_BUILD" ] | ||
then | ||
|
||
docker build -t "$IMAGE_NAME" . | ||
|
||
if [ "$RELEASE" = true ] | ||
then | ||
docker tag "$IMAGE_NAME" "$LATEST_IMAGE_NAME" | ||
fi | ||
fi | ||
|
||
if [[ ! -z "$DOCKER_USERNAME" ]] | ||
then | ||
echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin | ||
docker push "$IMAGE_NAME" | ||
if [ "$RELEASE" = true ] | ||
then | ||
docker push $LATEST_IMAGE_NAME | ||
fi | ||
fi |