modified: .gitea/actions/buildkit-build-push-dev/action.yaml
/ ssh-client-container-build-push (push) Failing after 12s
/ ssh-client-container-build-push (push) Failing after 12s
modified: .gitea/workflows/ssh-client-build-deploy.yaml
This commit is contained in:
@@ -39,31 +39,27 @@ runs:
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
DOCKER_CONFIG_DIR="${RUNNER_TEMP}/.buildctl_docker"
|
||||
mkdir -p "$DOCKER_CONFIG_DIR"
|
||||
|
||||
# clean up
|
||||
trap 'rm -rf "$DOCKER_CONFIG_DIR"' EXIT
|
||||
|
||||
|
||||
USER='${{ inputs.registry_username }}'
|
||||
PASS='${{ inputs.registry_password }}'
|
||||
|
||||
AUTH_INLINE=$(printf '%s:%s' "$USER" "$PASS" | base64 -w0)
|
||||
echo "AUTH_INLINE generated successfully"
|
||||
|
||||
read -r -d '' AUTH_JSON <<'EOF'
|
||||
cat > "$DOCKER_CONFIG_DIR/config.json" <<EOF
|
||||
{
|
||||
"auths": {
|
||||
"__REGISTRY__": {
|
||||
"auth": "__AUTH__"
|
||||
"${{ inputs.registry_addr }}": {
|
||||
"auth": "$AUTH"
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
REG_ESCAPED="${{ inputs.registry_addr }}"
|
||||
REG_ESCAPED="${REG_ESCAPED//\//\\/}"
|
||||
|
||||
AUTH_JSON="${AUTH_JSON/__REGISTRY__/$REG_ESCAPED}"
|
||||
AUTH_JSON="${AUTH_JSON/__AUTH__/$AUTH_INLINE}"
|
||||
|
||||
BUILD_ARGS="${{ inputs.build_args:-}}"
|
||||
|
||||
BUILD_ARG_FLAGS=""
|
||||
while IFS= read -r line; do
|
||||
[[ -z "$line" ]] && continue
|
||||
@@ -71,6 +67,7 @@ runs:
|
||||
done <<< "$BUILD_ARGS"
|
||||
|
||||
echo "Using build args: $BUILD_ARG_FLAGS"
|
||||
|
||||
echo "build and push image to ${{ inputs.registry_addr }}"
|
||||
|
||||
buildctl \
|
||||
@@ -81,4 +78,4 @@ runs:
|
||||
--local dockerfile=${{ inputs.dockerfile }} \
|
||||
--opt filename=${{ inputs.filename }} \
|
||||
$BUILD_ARG_FLAGS \
|
||||
--output type=image,name=${{ inputs.tags }},push=true,registry.config="$AUTH_JSON"
|
||||
--output type=image,name=${{ inputs.tags }},push=true
|
||||
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
curl -fsSL https://git.limbosolutions.com/kb/gitea/raw/branch/main/cloud-scripts/setup-limbo-actions.sh | bash 2>&1
|
||||
|
||||
- name: Build and push ssh-client container images
|
||||
uses: ./.gitea/limbo_actions/buildkit-build-push
|
||||
uses: ./.gitea/actions/buildkit-build-push-dev
|
||||
with:
|
||||
tags: oci.limbosolutions.com/public/ssh-client:latest
|
||||
registry_addr: ${{ vars.OCI_LIMBO_REGISTRY_ADDRESS }}
|
||||
|
||||
Reference in New Issue
Block a user