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
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
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 }}'
|
USER='${{ inputs.registry_username }}'
|
||||||
PASS='${{ inputs.registry_password }}'
|
PASS='${{ inputs.registry_password }}'
|
||||||
|
|
||||||
AUTH_INLINE=$(printf '%s:%s' "$USER" "$PASS" | base64 -w0)
|
AUTH_INLINE=$(printf '%s:%s' "$USER" "$PASS" | base64 -w0)
|
||||||
echo "AUTH_INLINE generated successfully"
|
echo "AUTH_INLINE generated successfully"
|
||||||
|
cat > "$DOCKER_CONFIG_DIR/config.json" <<EOF
|
||||||
read -r -d '' AUTH_JSON <<'EOF'
|
|
||||||
{
|
{
|
||||||
"auths": {
|
"auths": {
|
||||||
"__REGISTRY__": {
|
"${{ inputs.registry_addr }}": {
|
||||||
"auth": "__AUTH__"
|
"auth": "$AUTH"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
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=""
|
BUILD_ARG_FLAGS=""
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
[[ -z "$line" ]] && continue
|
[[ -z "$line" ]] && continue
|
||||||
@@ -71,6 +67,7 @@ runs:
|
|||||||
done <<< "$BUILD_ARGS"
|
done <<< "$BUILD_ARGS"
|
||||||
|
|
||||||
echo "Using build args: $BUILD_ARG_FLAGS"
|
echo "Using build args: $BUILD_ARG_FLAGS"
|
||||||
|
|
||||||
echo "build and push image to ${{ inputs.registry_addr }}"
|
echo "build and push image to ${{ inputs.registry_addr }}"
|
||||||
|
|
||||||
buildctl \
|
buildctl \
|
||||||
@@ -81,4 +78,4 @@ runs:
|
|||||||
--local dockerfile=${{ inputs.dockerfile }} \
|
--local dockerfile=${{ inputs.dockerfile }} \
|
||||||
--opt filename=${{ inputs.filename }} \
|
--opt filename=${{ inputs.filename }} \
|
||||||
$BUILD_ARG_FLAGS \
|
$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
|
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
|
- name: Build and push ssh-client container images
|
||||||
uses: ./.gitea/limbo_actions/buildkit-build-push
|
uses: ./.gitea/actions/buildkit-build-push-dev
|
||||||
with:
|
with:
|
||||||
tags: oci.limbosolutions.com/public/ssh-client:latest
|
tags: oci.limbosolutions.com/public/ssh-client:latest
|
||||||
registry_addr: ${{ vars.OCI_LIMBO_REGISTRY_ADDRESS }}
|
registry_addr: ${{ vars.OCI_LIMBO_REGISTRY_ADDRESS }}
|
||||||
|
|||||||
Reference in New Issue
Block a user