Files
LOGAR/.gitea/workflows/build-runner.yml
T
me0nline 125870b135
CI Test Suite / Run Component Tests & Pipeline Verification (push) Failing after 7s
Release Binaries & Packages / Build & Release Standalone Binaries (Linux & Windows Cross-Compilation) (push) Failing after 6s
Build and Push LOGAR Runner / Build & Push Runner Image (push) Canceled after 0s
ci(runner): align workflow with CodeChecker pipeline template and pull base image before build
2026-09-26 18:38:36 +02:00

63 lines
2.4 KiB
YAML

name: Build and Push LOGAR Runner
on:
workflow_dispatch:
push:
paths:
- 'runner/**'
- '.gitea/workflows/build-runner.yml'
jobs:
build-and-push:
name: Build & Push Runner Image
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Ensure Docker CLI is available
run: |
if ! command -v docker >/dev/null 2>&1; then
echo "Docker CLI not found. Downloading static Docker CLI binary..."
curl -fSL --connect-timeout 15 --max-time 120 --retry 3 https://download.docker.com/linux/static/stable/x86_64/docker-27.3.1.tgz -o /tmp/docker.tgz
tar -xzf /tmp/docker.tgz -C /usr/local/bin --strip-components=1 docker/docker
chmod +x /usr/local/bin/docker
rm -f /tmp/docker.tgz
fi
docker version
- name: Log in to Gitea Container Registry
run: |
REGISTRY="gitea.eibl.tech"
USER="${{ secrets.PACKAGESUSER || secrets.GITEAUSER || secrets.packagesuser || 'me0nline' }}"
PASS="${{ secrets.GITEATOKEN || secrets.PACKAGESTOKEN || secrets.packagestoken || 'f64c72025024b0628479b889d871eb764d812951' }}"
echo "Logging in to ${REGISTRY} as ${USER}..."
echo "${PASS}" | docker login "${REGISTRY}" -u "${USER}" --password-stdin
- name: Build Docker Image
env:
DOCKER_BUILDKIT: "0"
run: |
IMAGE_TAG="gitea.eibl.tech/me0nline/logar-runner:latest"
echo "Pulling base codechecker-runner image..."
docker pull gitea.eibl.tech/me0nline/codechecker-runner:latest || true
echo "Building ${IMAGE_TAG} on top of codechecker-runner..."
docker build \
-t "${IMAGE_TAG}" \
-f runner/Dockerfile \
runner/
- name: Push to Gitea Container Registry
run: |
IMAGE_TAG="gitea.eibl.tech/me0nline/logar-runner:latest"
echo "Pushing ${IMAGE_TAG} to Gitea Container Registry..."
docker push "${IMAGE_TAG}"
echo "Successfully pushed ${IMAGE_TAG} to Gitea Container Registry!"
- name: Trigger Portainer redeploy via webhook
run: |
echo "Notifying Portainer to redeploy the runner stack..."
curl -s -X POST \
"https://portainer.eibl.tech/api/stacks/webhooks/6e67c0b7-1c5d-4bb2-b8b8-4a6ec66d3b87"
echo "✓ Portainer webhook triggered"