This commit is contained in:
Bensch
2026-02-24 13:54:33 +00:00
parent 4d7f91b116
commit d909c0cd48

View File

@@ -1,9 +1,51 @@
- name: Build via remote BuildKit name: Build and Push
run: |
buildctl \ on: [push]
--addr tcp://buildkit.default.svc.cluster.local:1234 \
build \
--frontend dockerfile.v0 \
--local context=. \ jobs:
--local dockerfile=. \
--output type=image,name=registry/myapp:latest,push=true build:
runs-on: buildkit # Matches the label you just fixed!
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build via remote BuildKit
run: |
# 1. Provide Registry Credentials
# BuildKit needs a ~/.docker/config.json to push to a private registry.
# If your registry is public or uses Node-level auth, you can skip this.
mkdir -p ~/.docker
echo '{"auths":{"registry.yourdomain.com":{"auth":"$(echo -n "username:password" | base64)"}}}' > ~/.docker/config.json
# 2. Execute Build
buildctl \
--addr tcp://buildkit.default.svc.cluster.local:1234 \
build \
--frontend dockerfile.v0 \
--local context=. \
--local dockerfile=. \
--output type=image,name=registry/myapp:latest,push=true