From fce09b2ac320ed41f0b04ca13512bf9acb7a268d Mon Sep 17 00:00:00 2001 From: Alex Gartner Date: Wed, 2 Oct 2024 00:58:37 -0700 Subject: [PATCH] ci: ensure variables are set for cache build (#2948) --- .github/workflows/reusable-e2e.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/reusable-e2e.yml b/.github/workflows/reusable-e2e.yml index 1ef194667e..aaac140960 100644 --- a/.github/workflows/reusable-e2e.yml +++ b/.github/workflows/reusable-e2e.yml @@ -69,6 +69,14 @@ jobs: } skip-extraction: ${{ steps.restore-go-cache.outputs.cache-hit || github.event_name != 'push' }} + # this ensures that the version is consistent between cache build and make build + - name: Set version for cache + run: | + NODE_VERSION=$(./version.sh) + echo "NODE_VERSION=$NODE_VERSION" >> $GITHUB_ENV + NODE_COMMIT=$(git log -1 --format='%H') + echo "NODE_COMMIT=$NODE_COMMIT" >> $GITHUB_ENV + # build zetanode with cache options - name: Build zetanode for cache uses: docker/build-push-action@v6 @@ -83,6 +91,9 @@ jobs: cache-from: ${{ env.CACHE_FROM_CONFIG }} cache-to: ${{ github.event_name == 'push' && env.CACHE_TO_CONFIG || '' }} target: latest-runtime + build-args: | + NODE_VERSION=${{ env.NODE_VERSION }} + NODE_COMMIT=${{ env.NODE_COMMIT }} - name: Enable monitoring if: inputs.enable-monitoring