Files
test_build/.gitea/workflows/test.yaml
Bensch 13d6e28f2b
Some checks failed
Build Dockerfile with Remote BuildKit / build (push) Failing after 5s
test
2026-02-24 14:56:27 +00:00

42 lines
1.1 KiB
YAML

name: Build Dockerfile with Remote BuildKit
on:
push:
branches:
- main
jobs:
build:
runs-on: ["buildkit"] # must match runner labels
steps:
- name: Install Node.js on Alpine
run: |
apk add --no-cache nodejs npm git bash curl
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v4
# Install buildctl if not already installed
- name: Install buildctl
run: |
if ! command -v buildctl &> /dev/null; then
echo "Installing buildctl..."
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
fi
# Build and push Dockerfile using remote BuildKit
- name: Build and Push Dockerfile
run: |
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