@@ -38,20 +38,15 @@ runs:
|
||||
- name: run buildctl build and push
|
||||
shell: bash
|
||||
run: |
|
||||
AUTH_INLINE=$(printf '%s:%s' "${{ inputs.registry_username }}" "${{ inputs.registry_password }}" | base64 -w0)
|
||||
set -euo pipefail
|
||||
echo "USERNAME RAW: ${{ inputs.registry_username }}"
|
||||
echo "PASSWORD RAW: ${{ inputs.registry_password }}"
|
||||
USER="${{ inputs.registry_username }}"
|
||||
PASS="${{ inputs.registry_password }}"
|
||||
|
||||
read -r -d '' AUTH_JSON <<'EOF'
|
||||
{
|
||||
"auths": {
|
||||
"__REGISTRY__": {
|
||||
"auth": "__AUTH__"
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
AUTH_INLINE=$(printf '%s:%s' "$USER" "$PASS" | base64 -w0)
|
||||
|
||||
AUTH_JSON="${AUTH_JSON/__REGISTRY__/${{ inputs.registry_addr }}}"
|
||||
AUTH_JSON="${AUTH_JSON/__AUTH__/$AUTH_INLINE}"
|
||||
echo "AUTH_INLINE generated successfully"
|
||||
|
||||
buildctl \
|
||||
--addr ${{ inputs.buildkit_addr }} \
|
||||
|
||||
Reference in New Issue
Block a user