diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 378ce94..70bfe59 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,8 +15,10 @@ env: jobs: docker: - #runs-on: ubuntu-latest runs-on: [ "ubuntu-latest-m" ] + strategy: + matrix: + network: ["test", "prod"] steps: - name: Checkout uses: actions/checkout@v4 @@ -39,7 +41,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.REGISTRY_IMAGE }} + images: ${{ env.REGISTRY_IMAGE }}-${{ matrix.network }} - name: Build and push uses: docker/build-push-action@v5 @@ -49,4 +51,6 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + build-args: | + NETWORK=${{ matrix.network }}.mobilecoin.com #tags: ${{ env.REGISTRY_IMAGE }}:latest diff --git a/Dockerfile b/Dockerfile index 14ebe29..85726cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,28 +4,24 @@ FROM ubuntu:focal-20230126 as mc-builder SHELL ["/bin/bash", "-c"] +ARG NETWORK +ENV NETWORK ${NETWORK} + +RUN "Network: $NETWORK" + RUN ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime \ && apt-get update \ && apt-get upgrade -y \ && apt-get install -y \ build-essential \ - #clang \ cmake \ curl \ git \ - #jq \ libclang-dev \ libprotobuf-dev \ - #libpq-dev \ - #libssl1.1 \ - #libssl-dev \ - #llvm \ - #llvm-dev \ - #pkg-config \ unzip \ wget \ zlib1g-dev \ - #zstd \ && apt-get clean \ && rm -r /var/lib/apt/lists diff --git a/build.sh b/build.sh index e61c2af..e9c392c 100755 --- a/build.sh +++ b/build.sh @@ -4,7 +4,8 @@ set -ex cd mobilecoin -export NETWORK="test.mobilecoin.com" IAS_MODE=PROD SGX_MODE=HW +export IAS_MODE=PROD SGX_MODE=HW +echo "Network: $NETWORK" export GIT_REV=`git rev-parse HEAD` echo "GIT_REV = ${GIT_REV}"