Skip to content

Commit 79ef6b8

Browse files
committed
added env vars
1 parent 572d4f3 commit 79ef6b8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/build-rancher.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,16 @@ fi
3333
echo "Setting BUILD_SAFE_DIRS=${BUILD_SAFE_DIRS} to allow local replace directive"
3434
make quick
3535

36+
echo ""
3637
echo "Loading images from buildx cache to local Docker daemon..."
38+
39+
# copied from make quick
40+
COMMIT=$(git rev-parse --short HEAD)
41+
TAG="${TAG:-$(grep -m1 ' TAG:' .github/workflows/pull-request.yml | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' -e "s/\${{ github.sha }}/$COMMIT/g" | cut -d' ' -f2)}"
42+
OS="${OS:-linux}"
43+
ARCH="${ARCH:-amd64}"
44+
REPO="${REPO:-rancher}"
45+
3746
echo "Using values: REPO=${REPO}, TAG=${TAG}, OS=${OS}, ARCH=${ARCH}"
3847

3948
# Load rancher server image

0 commit comments

Comments
 (0)