Skip to content

Commit 58e9c03

Browse files
committed
add GH_TOKEN to cloning steps
1 parent 0797950 commit 58e9c03

4 files changed

Lines changed: 6 additions & 18 deletions

File tree

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,6 @@ jobs:
4040
private-key: ${{ secrets.GH_APP_KEY }}
4141
owner: ${{ github.repository_owner }}
4242

43-
- name: Check token format
44-
run: |
45-
TOKEN="${{ steps.app.outputs.token }}"
46-
if [[ "$TOKEN" == ghu_* ]]; then
47-
echo "GitHub App installation token"
48-
elif [[ "$TOKEN" == eyJ* ]]; then
49-
echo "JWT token"
50-
elif [[ "$TOKEN" == ghp_* ]]; then
51-
echo "Personal Access Token"
52-
fi
53-
echo "Token preview (first 5 chars): ${TOKEN:0:5}"
54-
5543
- name: Set GH_TOKEN for all steps
5644
run: echo "GH_TOKEN=${{ steps.app.outputs.token }}" >> $GITHUB_ENV
5745

packaging_automation/tests/test_publish_docker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525

2626
BASE_PATH = os.getenv("BASE_PATH", default=pathlib2.Path(__file__).parents[2])
2727
EXEC_PATH = f"{BASE_PATH}/docker"
28-
28+
GH_TOKEN = os.getenv("GH_TOKEN")
2929

3030
def initialize_env():
3131
if not os.path.exists("docker"):
32-
run("git clone https://github.com/citusdata/docker.git")
32+
run(f"git clone https://x-access-token:{GH_TOKEN}@github.com/citusdata/docker.git")
3333

3434

3535
def test_decode_triggering_event_info():

packaging_automation/tests/test_update_docker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@
3030
version_details = get_version_details(PROJECT_VERSION)
3131
TEMPLATE_PATH = f"{BASE_PATH}/packaging_automation/templates/docker"
3232
PKGVARS_FILE = f"{TEST_BASE_PATH}/pkgvars"
33-
33+
GH_TOKEN = os.getenv("GH_TOKEN")
3434

3535
def setup_module():
3636
if not os.path.exists("docker"):
37-
run("git clone https://github.com/citusdata/docker.git")
37+
run(f"git clone https://x-access-token:{GH_TOKEN}@github.com/citusdata/docker.git")
3838

3939

4040
def teardown_module():

packaging_automation/tests/test_update_pgxn.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
PROJECT_VERSION = "10.0.3"
1515
PROJECT_NAME = "citus"
1616
TEMPLATE_PATH = f"{BASE_PATH}/packaging_automation/templates/pgxn"
17-
17+
GH_TOKEN = os.getenv("GH_TOKEN")
1818

1919
def setup_module():
2020
if not os.path.exists("packaging_test"):
2121
run(
22-
"git clone --branch pgxn-citus https://github.com/citusdata/packaging.git packaging_test"
22+
f"git clone --branch pgxn-citus https://x-access-token:{GH_TOKEN}@github.com/citusdata/packaging.git packaging_test"
2323
)
2424

2525

0 commit comments

Comments
 (0)