|
60 | 60 | username: ${{ secrets.DOCKERHUB_USER_NAME }} |
61 | 61 | password: ${{ secrets.DOCKERHUB_PASSWORD }} |
62 | 62 |
|
| 63 | + - name: "Debug: Confirm token can access repos and git auth works" |
| 64 | + run: | |
| 65 | + echo "GH_TOKEN present: ${GH_TOKEN:+yes}" |
| 66 | + echo "GH_TOKEN length: $(echo -n "$GH_TOKEN" | wc -c)" |
| 67 | + |
| 68 | + packaging_status=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token $GH_TOKEN" https://api.github.com/repos/citusdata/packaging) |
| 69 | + echo "packaging repo status: $packaging_status" |
| 70 | + docker_status=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token $GH_TOKEN" https://api.github.com/repos/citusdata/docker) |
| 71 | + echo "docker repo status: $docker_status" |
| 72 | + |
| 73 | + if [[ "$packaging_status" != "200" ]]; then |
| 74 | + echo "ERROR: packaging repo access failed with status $packaging_status" |
| 75 | + exit 1 |
| 76 | + fi |
| 77 | + if [[ "$docker_status" != "200" ]]; then |
| 78 | + echo "ERROR: docker repo access failed with status $docker_status" |
| 79 | + exit 1 |
| 80 | + fi |
| 81 | + |
| 82 | + if git ls-remote --exit-code "https://github.com/citusdata/packaging.git" HEAD >/dev/null 2>&1; then |
| 83 | + echo "git auth (ls-remote) succeeded" |
| 84 | + else |
| 85 | + echo "git auth (ls-remote) FAILED" |
| 86 | + exit 1 |
| 87 | + fi |
| 88 | +
|
| 89 | + - name: "Debug: Verify git config url rewrite is active" |
| 90 | + run: git config --global --get-regexp url.*insteadOf | sed -E 's@(https://x-access-token:)[^@]*@\1REDACTED@' || true |
| 91 | + |
| 92 | + - name: "Debug: Test token access from inside container" |
| 93 | + run: | |
| 94 | + docker run --rm -e GITHUB_TOKEN="$GH_TOKEN" citus/packaging-test:debian-trixie-all sh -c "curl -s -o /dev/null -w 'Container API status: %{http_code}\n' -H 'Authorization: token \$GITHUB_TOKEN' https://api.github.com/repos/citusdata/packaging" |
| 95 | +
|
63 | 96 | - name: Clone build branch |
64 | 97 | run: git clone -b "${MAIN_BRANCH}" --depth=1 https://github.com/citusdata/packaging.git packaging |
65 | 98 |
|
| 99 | + - name: "Debug: Confirm clone succeeded and files are present" |
| 100 | + run: | |
| 101 | + echo "packaging dir listing:" |
| 102 | + ls -la packaging || true |
| 103 | + echo "templates docker listing:" |
| 104 | + find packaging -maxdepth 4 -type f -name '*docker*' -print || true |
| 105 | +
|
66 | 106 | - name: Install package dependencies |
67 | 107 | run: sudo apt-get update && sudo apt-get install libcurl4-openssl-dev libssl-dev python3-testresources |
68 | 108 |
|
|
0 commit comments