From 0b81b32894e2416fa9aad0e339036070ce3295f5 Mon Sep 17 00:00:00 2001 From: Schneems Date: Wed, 11 Dec 2024 19:34:17 -0600 Subject: [PATCH] Add a second run for showing the cache output --- .github/workflows/ci.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c4de6a..286ce89 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -134,24 +134,32 @@ jobs: run: cargo libcnb package --target ${{ matrix.target }} - name: "PRINT: Getting started guide output" run: | + set -euo pipefail + if [ "${{ matrix.guide }}" == "heroku/java-getting-started" ]; then pack build my-image --force-color --builder heroku/builder:24 --trust-extra-buildpacks --path tmp/guide --pull-policy never \ - --buildpack packaged/${{ matrix.target }}/debug/heroku_jvm \ + PACK_CMD="--buildpack packaged/${{ matrix.target }}/debug/heroku_jvm \ --buildpack packaged/${{ matrix.target }}/debug/heroku_java \ --buildpack packaged/${{ matrix.target }}/debug/heroku_maven \ - + " elif [ "${{ matrix.guide }}" == "heroku/gradle-getting-started" ]; then - pack build my-image --force-color --builder heroku/builder:24 --trust-extra-buildpacks --path tmp/guide --pull-policy never \ + PACK_CMD="pack build my-image --force-color --builder heroku/builder:24 --trust-extra-buildpacks --path tmp/guide --pull-policy never \ --buildpack packaged/${{ matrix.target }}/debug/heroku_jvm \ --buildpack packaged/${{ matrix.target }}/debug/heroku_gradle \ - + " elif [ "${{ matrix.guide }}" == "heroku/scala-getting-started" ]; then - pack build my-image --force-color --builder heroku/builder:24 --trust-extra-buildpacks --path tmp/guide --pull-policy never \ + PACK_CMD="pack build my-image --force-color --builder heroku/builder:24 --trust-extra-buildpacks --path tmp/guide --pull-policy never \ --buildpack packaged/${{ matrix.target }}/debug/heroku_jvm \ --buildpack packaged/${{ matrix.target }}/debug/heroku_sbt \ --buildpack packaged/${{ matrix.target }}/debug/heroku_scala \ - + " else echo "Unknown guide: ${{ matrix.guide }}" exit 1 fi + bash -c "$PACK_CMD" + echo "" + echo "With CACHE example" + echo "" + bash -c "$PACK_CMD" +