Skip to content

Commit

Permalink
Add a second run for showing the cache output
Browse files Browse the repository at this point in the history
  • Loading branch information
schneems committed Dec 12, 2024
1 parent a33e8e8 commit 2537d74
Showing 1 changed file with 30 additions and 16 deletions.
46 changes: 30 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,24 +134,38 @@ jobs:
run: cargo libcnb package --target ${{ matrix.target }}
- name: "PRINT: Getting started guide output"
run: |
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 \
--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 \
--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 \
--buildpack packaged/${{ matrix.target }}/debug/heroku_jvm \
--buildpack packaged/${{ matrix.target }}/debug/heroku_sbt \
--buildpack packaged/${{ matrix.target }}/debug/heroku_scala \
set -euo pipefail
PACK_CMD="pack build my-image --force-color --builder heroku/builder:24 --trust-extra-buildpacks --path tmp/guide --pull-policy never"
if [ "${{ matrix.guide }}" == "heroku/java-getting-started" ]; then
PACK_CMD+=$(cat <<EOF
--buildpack packaged/${{ matrix.target }}/debug/heroku_jvm
--buildpack packaged/${{ matrix.target }}/debug/heroku_java
--buildpack packaged/${{ matrix.target }}/debug/heroku_maven
EOF
)
elif [ "${{ matrix.guide }}" == "heroku/gradle-getting-started" ]; then
PACK_CMD+=$(cat <<EOF
--buildpack packaged/${{ matrix.target }}/debug/heroku_jvm \
--buildpack packaged/${{ matrix.target }}/debug/heroku_gradle \
EOF
)
elif [ "${{ matrix.guide }}" == "heroku/scala-getting-started" ]; then
PACK_CMD+=$(cat <<EOF
--buildpack packaged/${{ matrix.target }}/debug/heroku_jvm \
--buildpack packaged/${{ matrix.target }}/debug/heroku_sbt \
--buildpack packaged/${{ matrix.target }}/debug/heroku_scala \
EOF
)
else
echo "Unknown guide: ${{ matrix.guide }}"
exit 1
fi
echo "Running command $PACK_CMD"
echo ""
bash -c "$PACK_CMD"
echo ""
echo "With CACHE example"
echo ""
bash -c "$PACK_CMD"

0 comments on commit 2537d74

Please sign in to comment.