From 02d50e694b89fca0b9a7772a6388b911463ae360 Mon Sep 17 00:00:00 2001 From: Chris Collins Date: Mon, 8 Jul 2024 13:37:05 -1000 Subject: [PATCH] Adds ability to use GITHUB_TOKEN auth for backplane-tools Adds the ability to use an exported `GITHUB_TOKEN` env variable for backplane-tools authenticated installs. Signed-off-by: Chris Collins --- .ci/pull-request-check.sh | 4 +++- .ci/release-build.sh | 4 +++- Containerfile | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.ci/pull-request-check.sh b/.ci/pull-request-check.sh index 903225c..71f0b99 100755 --- a/.ci/pull-request-check.sh +++ b/.ci/pull-request-check.sh @@ -2,8 +2,10 @@ set -euo pipefail +GITHUB_TOKEN="${GITHUB_TOKEN:-}" + # Build the images -make BUILD_ARGS="--no-cache" build-image-amd64 +make BUILD_ARGS="--no-cache --build-arg GITHUB_TOKEN=${GITHUB_TOKEN}" build-image-amd64 # make BUILD_ARGS="--no-cache" build-image-arm64 make TAG=latest-amd64 ARCHITECTURE=amd64 tag diff --git a/.ci/release-build.sh b/.ci/release-build.sh index 234c75e..4e5a106 100755 --- a/.ci/release-build.sh +++ b/.ci/release-build.sh @@ -2,8 +2,10 @@ set -euo pipefail +GITHUB_TOKEN="${GITHUB_TOKEN:-}" + # Build the images -make BUILD_ARGS="--no-cache" build-image-amd64 +make BUILD_ARGS="--no-cache --build-arg GITHUB_TOKEN=${GITHUB_TOKEN}" build-image-amd64 # make BUILD_ARGS="--no-cache" build-image-arm64 make TAG=latest-amd64 ARCHITECTURE=amd64 tag diff --git a/Containerfile b/Containerfile index 3aa1116..dfe9eb5 100644 --- a/Containerfile +++ b/Containerfile @@ -13,7 +13,7 @@ FROM tools-base as backplane-tools ARG OUTPUT_DIR="/opt" # Set GH_TOKEN to use authenticated GH requests -ARG GH_TOKEN +ARG GITHUB_TOKEN ARG BACKPLANE_TOOLS_VERSION="tags/v1.2.0" ENV BACKPLANE_TOOLS_URL_SLUG="openshift/backplane-tools"