Skip to content

Commit

Permalink
ci: ensure variables are set for cache build
Browse files Browse the repository at this point in the history
  • Loading branch information
gartnera committed Oct 1, 2024
1 parent f9cbcfc commit 2aa7099
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/reusable-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 2aa7099

Please sign in to comment.