Compare commits

...

5 Commits

Author SHA1 Message Date
Márcio Fernandes
1bfab7df29 feat: limbo_actions/buildkit-build-push: added build_args argument
All checks were successful
/ build-docker-image (push) Successful in 7m28s
2026-03-16 10:40:35 +00:00
Márcio Fernandes
d5cf6786af feat: limbo_actions/buildkit-build-push: filename argument
All checks were successful
/ build-docker-image (push) Successful in 1m10s
2026-03-16 10:23:03 +00:00
Márcio Fernandes
b518f33ddf modified: .gitea/workflows/act-network-stack-deploy.yml
All checks were successful
/ build-docker-image (push) Successful in 1m32s
modified:   .gitea/workflows/act-runner-network-stack-deploy.yml
2026-03-16 01:41:04 +00:00
Márcio Fernandes
9786c305a0 cicd - fix runs-on
All checks were successful
/ build-docker-image (push) Successful in 1m7s
2026-03-15 11:33:48 +00:00
Márcio Fernandes
8a83e7e9c1 build container images - buildkit
Some checks failed
/ build-docker-image (push) Has been cancelled
2026-03-15 11:30:05 +00:00
5 changed files with 44 additions and 36 deletions

View File

@@ -1,6 +1,5 @@
name: BuildKit Build and Deploys
description: "Build and deploy images"
name: BuildKit Build and push
description: "Build and push images using remote Buildkit"
inputs:
registry_addr:
description: registry address
@@ -25,10 +24,18 @@ inputs:
description: "buildctl build dockerfile/folder"
required: true
default: "."
filename:
description: "Docker file name (Default: Dockerfile)"
required: true
default: "Dockerfile"
build_args:
description: "Build arguments (multiline KEY=VALUE)"
required: false
default: ""
runs:
using: "composite"
steps:
- name: run buildctl built and push
- name: run buildctl build and push
shell: bash
run: |
@@ -39,7 +46,6 @@ runs:
# 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
@@ -52,14 +58,24 @@ runs:
}
EOF
# Run BuildKit build, set DOCKER_CONFIG to DOCKER_CONFIG_DIR so auth works on push
# Build build-arg flags
BUILD_ARG_FLAGS=""
while IFS= read -r line; do
[[ -z "$line" ]] && continue
BUILD_ARG_FLAGS="$BUILD_ARG_FLAGS --opt build-arg:${line}"
done <<< "${{ inputs.build_args }}"
echo "Using build args: $BUILD_ARG_FLAGS"
# Run BuildKit build
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 \
--opt filename=${{ inputs.filename }} \
$BUILD_ARG_FLAGS \
--output type=image,name=${{ inputs.tags }},push=true

View File

@@ -7,25 +7,20 @@ on:
jobs:
build-docker-image:
runs-on: ubuntu-latest
runs-on: ["oci-image-builder", "amd64"]
steps:
- name: Checkout code
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
id: push
uses: docker/build-push-action@v6
uses: ./.gitea/limbo_actions/buildkit-build-push
with:
registry_addr: ${{ vars.GITLIMBO_DOCKER_REGISTRY_ADDRESS }}
registry_username: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_USERNAME }}
registry_password: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_PASSWORD }}
buildkit_addr: ${{ vars.BUILDKIT_ADDRESS }}
context: ${{gitea.workspace}}/acts/network-stack
file: ${{gitea.workspace}}/acts/network-stack/Dockerfile
push: true
dockerfile: ${{gitea.workspace}}/acts/network-stack
tags: git.limbosolutions.com/kb/gitea/act:latest-network-stack

View File

@@ -7,25 +7,22 @@ on:
jobs:
build-docker-image:
runs-on: ubuntu-latest
runs-on: ["oci-image-builder", "amd64"]
steps:
- name: Checkout code
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
id: push
uses: docker/build-push-action@v6
uses: ./.gitea/limbo_actions/buildkit-build-push
with:
registry_addr: ${{ vars.GITLIMBO_DOCKER_REGISTRY_ADDRESS }}
registry_username: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_USERNAME }}
registry_password: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_PASSWORD }}
buildkit_addr: ${{ vars.BUILDKIT_ADDRESS }}
context: ${{gitea.workspace}}/act-runners/network-stack
file: ${{gitea.workspace}}/act-runners/network-stack/Dockerfile
push: true
tags: git.limbosolutions.com/kb/gitea/act_runner:0.2.13-network-stack
dockerfile: ${{gitea.workspace}}/act-runners/network-stack
tags: git.limbosolutions.com/kb/gitea/act_runner:0.3-network-stack

View File

@@ -23,6 +23,6 @@ mkdir -p ${RUNNER_TEMP}/gitea_src
mkdir -p ${WORKSPACE}/.gitea/limbo_actions
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")"
done