Compare commits

...

4 Commits

Author SHA1 Message Date
3344c63c2b gitea public actions added BuildKit Build and Deploys
Some checks are pending
/ build-docker-image (push) Waiting to run
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
fefb4b3a17 modified: act-runners/network-stack/Dockerfile
Some checks failed
/ build-docker-image (push) Has been cancelled
2026-03-14 22:29:54 +00:00
52d2cca438 modified: act-runners/network-stack/Dockerfile 2026-03-14 22:27:14 +00:00
2 changed files with 91 additions and 3 deletions

View File

@@ -0,0 +1,59 @@
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
default: "false"
name:
description: "image name"
required: true
default: "false"
context:
description: "buildctl build context"
required: false
default: "."
dockerfile:
description: "buildctl build dockerfile/folder"
required: true
default: "false"
runs:
using: "composite"
steps:
- name: Authenticate to Gitea registry
shell: bash
run: |
# Create a temporary file inside GITHUB_TEMP
DOCKER_CONFIG_FILE="${GITHUB_TEMP}/docker_config.json"
# Ensure cleanup ALWAYS happens
trap 'rm -f "$DOCKER_CONFIG_FILE"' EXIT
# Generate auth entry
AUTH=$(printf "%s" "${{ inputs.registry_username }}:${{ inputs.registry_password }}" | base64 -w 0)
printf '{"auths":{"%s":{"auth":"%s"}}}' \
"${{ inputs.registry_addr }}" \
"$AUTH" \
> "$DOCKER_CONFIG_FILE"
# Run BuildKit build
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,registry.config=$DOCKER_CONFIG_FILE

View File

@@ -1,5 +1,4 @@
FROM gitea/act_runner:0.2.13
FROM gitea/act_runner:0.3.0
RUN echo "build started.." && \
apk add --no-cache openssh-client curl ansible nodejs rclone rsync nodejs envsubst bash tar jq
@@ -21,3 +20,33 @@ RUN HELM_VERSION=$(curl -s https://api.github.com/repos/helm/helm/releases/lates
tar -zxvf helm.tar.gz && \
mv linux-amd64/helm /usr/local/bin/helm && \
rm -rf linux-amd64 helm.tar.gz
RUN echo "build started.." && \
apk add --no-cache openssh-client curl ansible nodejs rclone rsync nodejs envsubst bash tar jq
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
RUN chmod +x ./kubectl
RUN mv ./kubectl /usr/local/bin
RUN curl -fsSL https://get.helm.sh/helm-v3.14.4-linux-amd64.tar.gz \
-o helm.tar.gz && \
tar -zxvf helm.tar.gz && \
mv linux-amd64/helm /usr/local/bin/helm && \
rm -rf linux-amd64 helm.tar.gz
RUN HELM_VERSION=$(curl -s https://api.github.com/repos/helm/helm/releases/latest | jq -r .tag_name) && \
curl -fsSL https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz -o helm.tar.gz && \
tar -zxvf helm.tar.gz && \
mv linux-amd64/helm /usr/local/bin/helm && \
rm -rf linux-amd64 helm.tar.gz
# Install buildctl only (no buildkitd)
ENV BUILDKIT_VERSION=v0.28.0
RUN curl -L "https://github.com/moby/buildkit/releases/download/${BUILDKIT_VERSION}/buildkit-${BUILDKIT_VERSION}.linux-amd64.tar.gz" \
| tar -xz -C /usr/local/bin --strip-components=1 bin/buildctl
###################