fix: Create docker config.json directly for buildx auth
Some checks failed
Build and Push Images / determine-version (push) Successful in 55s
Build and Push Images / Release (push) Has been cancelled
Build and Push Images / Notify (push) Has been cancelled
Build and Push Images / build-strixhalo (push) Has been cancelled
Build and Push Images / build-intel (push) Has been cancelled
Build and Push Images / build-rdna2 (push) Has been cancelled
Build and Push Images / build-nvidia (push) Has been cancelled
Some checks failed
Build and Push Images / determine-version (push) Successful in 55s
Build and Push Images / Release (push) Has been cancelled
Build and Push Images / Notify (push) Has been cancelled
Build and Push Images / build-strixhalo (push) Has been cancelled
Build and Push Images / build-intel (push) Has been cancelled
Build and Push Images / build-rdna2 (push) Has been cancelled
Build and Push Images / build-nvidia (push) Has been cancelled
Bypass docker login command which requires daemon configuration. Instead, create ~/.docker/config.json directly with base64 auth. Buildx uses this config for registry authentication during push.
This commit is contained in:
@@ -114,11 +114,23 @@ jobs:
|
||||
username: ${{ vars.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
# Login to Gitea registry (direct docker login for rootless DinD compatibility)
|
||||
- name: Login to Gitea Registry
|
||||
# Create docker config for buildx to use (no daemon restart needed)
|
||||
- name: Configure registry credentials
|
||||
if: github.event_name != 'pull_request'
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login ${{ env.REGISTRY_HOST }} -u ${{ secrets.REGISTRY_USER }} --password-stdin
|
||||
mkdir -p ~/.docker
|
||||
echo "${{ secrets.REGISTRY_TOKEN }}" | docker --config ~/.docker login ${{ env.REGISTRY_HOST }} -u ${{ secrets.REGISTRY_USER }} --password-stdin || true
|
||||
# Also try creating auth directly for buildx
|
||||
AUTH=$(echo -n "${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_TOKEN }}" | base64)
|
||||
cat > ~/.docker/config.json << EOF
|
||||
{
|
||||
"auths": {
|
||||
"${{ env.REGISTRY_HOST }}": {
|
||||
"auth": "$AUTH"
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
@@ -166,10 +178,23 @@ jobs:
|
||||
username: ${{ vars.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Login to Gitea Registry
|
||||
# Create docker config for buildx to use (no daemon restart needed)
|
||||
- name: Configure registry credentials
|
||||
if: github.event_name != 'pull_request'
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login ${{ env.REGISTRY_HOST }} -u ${{ secrets.REGISTRY_USER }} --password-stdin
|
||||
mkdir -p ~/.docker
|
||||
echo "${{ secrets.REGISTRY_TOKEN }}" | docker --config ~/.docker login ${{ env.REGISTRY_HOST }} -u ${{ secrets.REGISTRY_USER }} --password-stdin || true
|
||||
# Also try creating auth directly for buildx
|
||||
AUTH=$(echo -n "${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_TOKEN }}" | base64)
|
||||
cat > ~/.docker/config.json << EOF
|
||||
{
|
||||
"auths": {
|
||||
"${{ env.REGISTRY_HOST }}": {
|
||||
"auth": "$AUTH"
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
@@ -217,10 +242,23 @@ jobs:
|
||||
username: ${{ vars.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Login to Gitea Registry
|
||||
# Create docker config for buildx to use (no daemon restart needed)
|
||||
- name: Configure registry credentials
|
||||
if: github.event_name != 'pull_request'
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login ${{ env.REGISTRY_HOST }} -u ${{ secrets.REGISTRY_USER }} --password-stdin
|
||||
mkdir -p ~/.docker
|
||||
echo "${{ secrets.REGISTRY_TOKEN }}" | docker --config ~/.docker login ${{ env.REGISTRY_HOST }} -u ${{ secrets.REGISTRY_USER }} --password-stdin || true
|
||||
# Also try creating auth directly for buildx
|
||||
AUTH=$(echo -n "${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_TOKEN }}" | base64)
|
||||
cat > ~/.docker/config.json << EOF
|
||||
{
|
||||
"auths": {
|
||||
"${{ env.REGISTRY_HOST }}": {
|
||||
"auth": "$AUTH"
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
@@ -268,10 +306,23 @@ jobs:
|
||||
username: ${{ vars.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Login to Gitea Registry
|
||||
# Create docker config for buildx to use (no daemon restart needed)
|
||||
- name: Configure registry credentials
|
||||
if: github.event_name != 'pull_request'
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login ${{ env.REGISTRY_HOST }} -u ${{ secrets.REGISTRY_USER }} --password-stdin
|
||||
mkdir -p ~/.docker
|
||||
echo "${{ secrets.REGISTRY_TOKEN }}" | docker --config ~/.docker login ${{ env.REGISTRY_HOST }} -u ${{ secrets.REGISTRY_USER }} --password-stdin || true
|
||||
# Also try creating auth directly for buildx
|
||||
AUTH=$(echo -n "${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_TOKEN }}" | base64)
|
||||
cat > ~/.docker/config.json << EOF
|
||||
{
|
||||
"auths": {
|
||||
"${{ env.REGISTRY_HOST }}": {
|
||||
"auth": "$AUTH"
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
|
||||
Reference in New Issue
Block a user