From 5e18168997c45afb29fd8460b29bc80dbb9fb963 Mon Sep 17 00:00:00 2001 From: Colin Casey Date: Sun, 14 Jul 2024 13:43:04 -0300 Subject: [PATCH] Add CI step to docker pull the run image ahead of tests (#892) * Add CI step to docker pull the run image ahead of tests --- .github/workflows/ci.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d997996..eb5bb1ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: CI on: push: - branches: [ "main" ] + branches: ["main"] pull_request: permissions: @@ -102,6 +102,13 @@ jobs: uses: buildpacks/github-actions/setup-pack@v5.7.2 - name: Pull builder image run: docker pull ${{ env.INTEGRATION_TEST_CNB_BUILDER }} + - name: Pull run image + run: | + RUN_IMAGE=$( + docker inspect --format='{{index .Config.Labels "io.buildpacks.builder.metadata"}}' '${{ env.INTEGRATION_TEST_CNB_BUILDER }}' \ + | jq --exit-status --raw-output '.stack.runImage.image' + ) + docker pull "${RUN_IMAGE}" - name: Run integration tests working-directory: ${{ matrix.dir }} run: cargo test --locked -- --ignored --test-threads 16 @@ -134,7 +141,7 @@ jobs: matrix: # check the minimum node version supported by the metrics script and the latest node version # (assumes the versions between have backwards-compatible APIs) - version: [ 14.10.0, latest ] + version: [14.10.0, latest] name: Test Metrics (${{ matrix.version }}) runs-on: ubuntu-latest steps: