a9cd7750f4
CI / detect-changes (push) Waiting to run
CI / build (push) Waiting to run
UI v2 CI / E2E (Mocked) (push) Blocked by required conditions
UI v2 Integration CI / E2E (Integration) (push) Waiting to run
CI / unit-test (push) Blocked by required conditions
CI / test-harness (push) Waiting to run
CI / generate-e2e-matrix (push) Waiting to run
CI / e2e (push) Blocked by required conditions
CI / build-ui (push) Waiting to run
Publish docs via GitHub Pages / Deploy docs (push) Waiting to run
Release Drafter / update_release_draft (push) Waiting to run
UI v2 CI / Lint, Format & Test (push) Waiting to run
35 lines
1.2 KiB
YAML
35 lines
1.2 KiB
YAML
name: Debug Docker Credentials
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
check-docker-user:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check Docker Hub user for API key
|
|
env:
|
|
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
run: |
|
|
echo "Fetching JWT from Docker Hub..."
|
|
RESPONSE=$(curl -s -X POST \
|
|
-H "Content-Type: application/json" \
|
|
-d "{\"username\": \"${DOCKER_USERNAME}\", \"password\": \"${DOCKER_PASSWORD}\"}" \
|
|
https://hub.docker.com/v2/users/login)
|
|
|
|
JWT=$(echo "$RESPONSE" | jq -r '.token // empty')
|
|
|
|
if [ -z "$JWT" ]; then
|
|
echo "Login failed. Response:"
|
|
echo "$RESPONSE" | jq .
|
|
exit 1
|
|
fi
|
|
|
|
echo "Login successful. Fetching user info..."
|
|
USER_INFO=$(curl -s -H "Authorization: Bearer $JWT" https://hub.docker.com/v2/user/)
|
|
echo "Raw response:"
|
|
echo "$USER_INFO" | jq .
|
|
echo "Docker Hub account info:"
|
|
echo "$USER_INFO" | jq '{username: .username, full_name: .full_name, email: .email, company: .company, date_joined: .date_joined}'
|