Skip to content

Commit

Permalink
Merge pull request #1 from HugoBroudeur/aylin
Browse files Browse the repository at this point in the history
Aylin
  • Loading branch information
HugoBroudeur committed Mar 13, 2024
2 parents 62c931a + 713be8a commit 9eb8ed5
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 3 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/ci-oonodz-aylin.yml
@@ -0,0 +1,56 @@
name: Build + Push ooNodz image

on:
push:
branches:
- aylin
- main
tags:
- "*"

defaults:
run:
shell: bash

jobs:
build_oonodz_fuji_image_aylin:
name: Build Docker Image
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Get Current Tag
id: get_tag
run: echo ::set-output name=tag::$(git describe --abbrev=0 --tags)

- name: Login to Docker hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASS }}

- name: Build Dockerfile and Push it
run: |
TAG_FUJI=""
if [ "$CURRENT_BRANCH" == "aylin" ]; then
TAG_FUJI="fuji-"
echo "COPY --from=builder /build/jvrKsTB9MfYGnAXtxbzFYpXKceXr9J8J8ej6uWGrYM5tXswhJ /root/.avalanchego/plugins/jvrKsTB9MfYGnAXtxbzFYpXKceXr9J8J8ej6uWGrYM5tXswhJ" >> Dockerfile
fi
if [ -n "$GITHUB_TAG" ]; then
TAG_END=$GITHUB_TAG
else
TAG_END=$GITHUB_SHA
fi
export BUILD_IMAGE_ID="${{ vars.AVALANCHE_VERSION }}-${TAG_FUJI}${TAG_END}"
./scripts/build_image.sh
env:
CURRENT_BRANCH: ${{ github.head_ref || github.ref_name }}
PUSH_DOCKER_IMAGE: true
DOCKERHUB_REPO: logisticx/ava
GITHUB_TAG: ${{ steps.get_tag.outputs.tag }}
GITHUB_SHA: ${{ github.sha }}
2 changes: 2 additions & 0 deletions README.md
@@ -1,5 +1,7 @@
# Hubble v2

Update

To run a fresh local network - run `./scripts/run_local.sh`
To run on the same network with updated evm code(it preserves all evm state) - run `./scripts/upgrade_local.sh`
To kill network - run `avalanche network stop && avalanche network clean`
Expand Down
1 change: 1 addition & 0 deletions scripts/build_image.sh
Expand Up @@ -17,6 +17,7 @@ source "$SUBNET_EVM_PATH"/scripts/versions.sh
source "$SUBNET_EVM_PATH"/scripts/constants.sh

BUILD_IMAGE_ID=${BUILD_IMAGE_ID:-"${AVALANCHE_VERSION}-Subnet-EVM-${CURRENT_BRANCH}"}
DOCKERHUB_REPO=${DOCKERHUB_REPO:-"avaplatform/avalanchego"}

echo "Building Docker Image: $DOCKERHUB_REPO:$BUILD_IMAGE_ID based of $AVALANCHE_VERSION"
docker build -t "$DOCKERHUB_REPO:$BUILD_IMAGE_ID" "$SUBNET_EVM_PATH" -f "$SUBNET_EVM_PATH/Dockerfile" \
Expand Down
3 changes: 0 additions & 3 deletions scripts/constants.sh
Expand Up @@ -8,9 +8,6 @@ set -euo pipefail
# Set the PATHS
GOPATH="$(go env GOPATH)"

# Avalabs docker hub
DOCKERHUB_REPO="avaplatform/avalanchego"

# if this isn't a git repository (say building from a release), don't set our git constants.
if [ ! -d .git ]; then
CURRENT_BRANCH=""
Expand Down

0 comments on commit 9eb8ed5

Please sign in to comment.