Skip to content

Commit 8ad28a3

Browse files
committed
refactor: update GH_TOKEN usage in build process and tests
1 parent 413ed4e commit 8ad28a3

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/build-citus-community-nightlies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
- name: Build packages
7373
run: |
7474
python -m tools.packaging_automation.citus_package \
75-
--gh_token "${{ steps.app.outputs.token }}" \
75+
--gh_token "${GH_TOKEN}" \
7676
--platform "${{ matrix.platform }}" \
7777
--build_type "nightly" \
7878
--secret_key "${PACKAGING_SECRET_KEY}" \

packaging_automation/citus_package.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,6 @@ def build_packages(
401401
input_output_parameters: InputOutputParameters,
402402
is_test: bool = False,
403403
) -> None:
404-
os.environ["GH_TOKEN"] = github_token
405404
os_name, os_version = decode_os_and_release(platform)
406405
release_versions, nightly_versions = get_postgres_versions(
407406
platform, input_output_parameters.input_files_dir

packaging_automation/tests/test_citus_package.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@
6060

6161
TEST_GPG_KEY_NAME = "Citus Data <packaging@citusdata.com>"
6262
TEST_GPG_KEY_PASSPHRASE = os.getenv("PACKAGING_PASSPHRASE")
63-
GH_TOKEN = os.environ("GH_TOKEN")
63+
GH_TOKEN = os.getenv("GH_TOKEN")
64+
if not GH_TOKEN:
65+
raise ValueError("GH_TOKEN environment variable is required for tests to run")
6466
PACKAGE_CLOUD_API_TOKEN = os.getenv("PACKAGE_CLOUD_API_TOKEN")
6567
REPO_CLIENT_SECRET = os.getenv("REPO_CLIENT_SECRET")
6668
PLATFORM = get_build_platform(

0 commit comments

Comments
 (0)