Compare commits

..

7 Commits

Author SHA1 Message Date
9786c305a0 cicd - fix runs-on
All checks were successful
/ build-docker-image (push) Successful in 1m7s
2026-03-15 11:33:48 +00:00
8a83e7e9c1 build container images - buildkit
Some checks failed
/ build-docker-image (push) Has been cancelled
2026-03-15 11:30:05 +00:00
f77bd8935a Merge pull request 'BuildKit-build and push action - fix authentication on push' (#4) from tests/cicd into main
Some checks failed
/ build-docker-image (push) Has been cancelled
Reviewed-on: #4
2026-03-15 10:50:44 +00:00
febfe17222 BuildKit-build and push action - fix authentication on push 2026-03-15 10:50:02 +00:00
950726553c fix: name vs tag on buildkit-build-push
Some checks failed
/ build-docker-image (push) Has been cancelled
2026-03-15 08:52:48 +00:00
3344c63c2b gitea public actions added BuildKit Build and Deploys
Some checks failed
/ build-docker-image (push) Has been cancelled
2026-03-15 00:19:09 +00:00
c3a4c39f05 modified: act-runners/network-stack/Dockerfile
Some checks failed
/ build-docker-image (push) Has been cancelled
2026-03-14 23:12:51 +00:00
6 changed files with 88 additions and 40 deletions

View File

@@ -0,0 +1,65 @@
name: BuildKit Build and Deploys
description: "Build and deploy images"
inputs:
registry_addr:
description: registry address
required: true
registry_username:
description: "registry username"
required: true
registry_password:
description: "registry password"
required: true
buildkit_addr:
description: "buildkit address"
required: true
tags:
description: "image tags / buildctl image name"
required: true
context:
description: "buildctl build context"
required: false
default: "."
dockerfile:
description: "buildctl build dockerfile/folder"
required: true
default: "."
runs:
using: "composite"
steps:
- name: run buildctl built and push
shell: bash
run: |
# create docker config temp folder
DOCKER_CONFIG_DIR="${RUNNER_TEMP}/.buildctl_docker"
mkdir -p "$DOCKER_CONFIG_DIR"
# clean up
trap 'rm -rf "$DOCKER_CONFIG_DIR"' EXIT
# setup file docker config (auth) temp file
AUTH=$(printf "%s" "${{ inputs.registry_username }}:${{ inputs.registry_password }}" | base64 -w 0)
cat > "$DOCKER_CONFIG_DIR/config.json" <<EOF
{
"auths": {
"${{ inputs.registry_addr }}": {
"auth": "$AUTH"
}
}
}
EOF
# Run BuildKit build, set DOCKER_CONFIG to DOCKER_CONFIG_DIR so auth works on push
DOCKER_CONFIG=$DOCKER_CONFIG_DIR buildctl \
--addr ${{ inputs.buildkit_addr }} \
build \
--frontend=dockerfile.v0 \
--local context=${{ inputs.context }} \
--local dockerfile=${{ inputs.dockerfile }} \
--opt filename=Dockerfile \
--output type=image,name=${{ inputs.tags }},push=true

View File

@@ -7,25 +7,22 @@ on:
jobs: jobs:
build-docker-image: build-docker-image:
runs-on: ubuntu-latest runs-on: ["oci-image-builder", "amd64"]
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Log in to git.limbosolutions.com docker registry
uses: docker/login-action@v3
with:
registry: git.limbosolutions.com
username: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_PASSWORD }}
- name: Build and push Docker Image - name: Build and push Docker Image
id: push uses: ./.gitea/limbo_actions/buildkit-build-push
uses: docker/build-push-action@v6
with: with:
registry_addr: https://git.limbosolutions.com
registry_username: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_USERNAME }}
registry_password: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_PASSWORD }}
buildkit_addr: tcp://buildkitd.buildkit.svc.cluster.local:1234
context: ${{gitea.workspace}}/acts/network-stack context: ${{gitea.workspace}}/acts/network-stack
file: ${{gitea.workspace}}/acts/network-stack/Dockerfile dockerfile: ${{gitea.workspace}}/acts/network-stack
push: true
tags: git.limbosolutions.com/kb/gitea/act:latest-network-stack tags: git.limbosolutions.com/kb/gitea/act:latest-network-stack

View File

@@ -7,25 +7,22 @@ on:
jobs: jobs:
build-docker-image: build-docker-image:
runs-on: ubuntu-latest runs-on: ["oci-image-builder", "amd64"]
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Log in to git.limbosolutions.com docker registry
uses: docker/login-action@v3
with:
registry: git.limbosolutions.com
username: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_PASSWORD }}
- name: Build and push Docker Image - name: Build and push Docker Image
id: push uses: ./.gitea/limbo_actions/buildkit-build-push
uses: docker/build-push-action@v6
with: with:
registry_addr: https://git.limbosolutions.com
registry_username: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_USERNAME }}
registry_password: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_PASSWORD }}
buildkit_addr: tcp://buildkitd.buildkit.svc.cluster.local:1234
context: ${{gitea.workspace}}/act-runners/network-stack context: ${{gitea.workspace}}/act-runners/network-stack
file: ${{gitea.workspace}}/act-runners/network-stack/Dockerfile dockerfile: ${{gitea.workspace}}/act-runners/network-stack
push: true tags: git.limbosolutions.com/kb/gitea/act_runner:0.3-network-stack
tags: git.limbosolutions.com/kb/gitea/act_runner:0.2.13-network-stack

View File

@@ -44,20 +44,9 @@ RUN HELM_VERSION=$(curl -s https://api.github.com/repos/helm/helm/releases/lates
rm -rf linux-amd64 helm.tar.gz rm -rf linux-amd64 helm.tar.gz
### BUILD KID # Install buildctl only (no buildkitd)
ENV BUILDKIT_VERSION=v0.28.0 ENV BUILDKIT_VERSION=v0.28.0
RUN apk add --no-cache \
runc \
fuse-overlayfs \
iptables \
shadow \
util-linux \
containerd
RUN curl -L "https://github.com/moby/buildkit/releases/download/${BUILDKIT_VERSION}/buildkit-${BUILDKIT_VERSION}.linux-amd64.tar.gz" \ RUN curl -L "https://github.com/moby/buildkit/releases/download/${BUILDKIT_VERSION}/buildkit-${BUILDKIT_VERSION}.linux-amd64.tar.gz" \
| tar -xz -C /usr/local \ | tar -xz -C /usr/local/bin --strip-components=1 bin/buildctl
&& buildctl --version
################### ###################

View File

@@ -23,6 +23,6 @@ mkdir -p ${RUNNER_TEMP}/gitea_src
mkdir -p ${WORKSPACE}/.gitea/limbo_actions mkdir -p ${WORKSPACE}/.gitea/limbo_actions
git clone -b main --depth=1 https://git.limbosolutions.com/kb/gitea ${RUNNER_TEMP}/gitea_src git clone -b main --depth=1 https://git.limbosolutions.com/kb/gitea ${RUNNER_TEMP}/gitea_src
for dir in ${RUNNER_TEMP}/gitea_src/.gitea/actions/*; do for dir in ${RUNNER_TEMP}/gitea_src/.gitea/limbo_actions/*; do
ln -s "$dir" "${WORKSPACE}/.gitea/limbo_actions/$(basename "$dir")" ln -s "$dir" "${WORKSPACE}/.gitea/limbo_actions/$(basename "$dir")"
done done