diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index f794d60..84456ba 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -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 \ diff --git a/test2 b/test2 new file mode 100644 index 0000000..e69de29