diff --git a/.gitea/actions/buildkit-build-push-dev/action.yaml b/.gitea/actions/buildkit-build-push-dev/action.yaml index 99b64b0..e7042c2 100644 --- a/.gitea/actions/buildkit-build-push-dev/action.yaml +++ b/.gitea/actions/buildkit-build-push-dev/action.yaml @@ -38,27 +38,9 @@ runs: - name: run buildctl build and push shell: bash run: | - ############################################### - # Build args - ############################################### - - BUILD_ARG_FLAGS="" - while IFS= read -r line; do - [[ -z "$line" ]] && continue - BUILD_ARG_FLAGS="$BUILD_ARG_FLAGS --opt build-arg:${line}" - done <<< "${{ inputs.build_args }}" - - echo "Using build args: $BUILD_ARG_FLAGS" - - ############################################### - # Inline auth for BuildKit remote push - ############################################### - - AUTH_INLINE=$(printf "%s:%s" "${{ inputs.registry_username }}" "${{ inputs.registry_password }}" | base64 -w0) - - ############################################### - # Build + push using BuildKit REMOTE + INLINE AUTH - ############################################### + AUTH_JSON=$(printf '{"auths":{"%s":{"auth":"%s"}}}' \ + "${{ inputs.registry_addr }}" \ + "$(printf "%s:%s" "${{ inputs.registry_username }}" "${{ inputs.registry_password }}" | base64 -w0)") buildctl \ --addr ${{ inputs.buildkit_addr }} \ @@ -68,4 +50,4 @@ runs: --local dockerfile=${{ inputs.dockerfile }} \ --opt filename=${{ inputs.filename }} \ $BUILD_ARG_FLAGS \ - --output type=image,name=${{ inputs.tags }},push=true,registry.auth=$AUTH_INLINE + --output type=image,name=${{ inputs.tags }},push=true,registry.config=$AUTH_JSON diff --git a/.gitea/workflows/ssh-client-build-deploy.yaml b/.gitea/workflows/ssh-client-build-deploy.yaml index 7faad37..521e25b 100644 --- a/.gitea/workflows/ssh-client-build-deploy.yaml +++ b/.gitea/workflows/ssh-client-build-deploy.yaml @@ -21,6 +21,7 @@ jobs: env: RUNNER_TEMP: "${{ runner.temp }}" WORKSPACE: "${{ gitea.workspace }}" + run: | curl -fsSL https://git.limbosolutions.com/kb/gitea/raw/branch/main/cloud-scripts/setup-limbo-actions.sh | bash 2>&1