This commit is contained in:
Bensch
2026-02-24 14:00:31 +00:00
parent 1d95fd2243
commit 8ec5eb740b
2 changed files with 12 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
name: Build and Push
name: Remote BuildKit Build
on: [push]
@@ -8,7 +8,9 @@ jobs:
build:
runs-on: buildkit # Matches the label you just fixed!
# This must match one of the labels defined in the Deployment above
runs-on: buildkit
steps:
@@ -18,23 +20,23 @@ jobs:
- name: Build via remote BuildKit
- name: Install Buildctl (if missing)
run: |
# 1. Provide Registry Credentials
if ! command -v buildctl &> /dev/null; then
# BuildKit needs a ~/.docker/config.json to push to a private registry.
echo "Installing buildctl..."
# If your registry is public or uses Node-level auth, you can skip this.
wget -qO- https://github.com/moby/buildkit/releases/download/v0.12.5/buildkit-v0.12.5.linux-amd64.tar.gz | tar -xz -C /usr/local/bin --strip-components=1 bin/buildctl
mkdir -p ~/.docker
echo '{"auths":{"registry.yourdomain.com":{"auth":"$(echo -n "username:password" | base64)"}}}' > ~/.docker/config.json
fi
# 2. Execute Build
- name: Build and Push via Remote BuildKit
run: |
buildctl \