From 99b1e62d01d439048cff0894c2aa0be5792c6ea4 Mon Sep 17 00:00:00 2001 From: Alexander Aksenov Date: Thu, 18 Aug 2022 17:25:55 +0000 Subject: [PATCH] fix: build and start command splited to get exit code available --- --- a/.docker/Dockerfile-try-runtime +++ b/.docker/Dockerfile-try-runtime @@ -35,6 +35,8 @@ ARG PROFILE=release ARG FEATURE= ARG FORK_FROM= +ENV FEATURE $FEATURE +ENV FORK_FROM $FORK_FROM COPY . /unique_parachain WORKDIR /unique_parachain @@ -42,4 +44,7 @@ RUN echo "Requested features: $FEATURE\n" && \ echo "Fork from: $FORK_FROM\n" && \ - cargo run --features=$FEATURE --release -- try-runtime on-runtime-upgrade live --uri $FORK_FROM + cargo build --features=$FEATURE --release + + +CMD cargo run --features=$FEATURE --release -- try-runtime on-runtime-upgrade live --uri $FORK_FROM --- a/.github/workflows/try-runtime.yml +++ b/.github/workflows/try-runtime.yml @@ -93,6 +93,16 @@ - name: Build the stack run: docker-compose -f ".docker/docker-compose-try-runtime.yml" -f ".docker/docker-compose.try-runtime.${{ matrix.network }}.yml" up -d --build --force-recreate --timeout 300 --remove-orphans + - name: Collect Docker Logs + if: success() || failure() + uses: jwalton/gh-docker-logs@v2.2.0 + with: + dest: './try-runtime-logs.${{ matrix.features }}' + images: 'try-runtime' + + - name: Show docker logs + run: cat './try-runtime-logs.${{ matrix.features }}/try-runtime.log' + - name: Stop running containers if: always() # run this step always run: docker-compose -f ".docker/docker-compose-try-runtime.yml" -f ".docker/docker-compose.try-runtime.${{ matrix.network }}.yml" down -- gitstuff