Files
Fridger/.gitea/workflows/build-runner.yml
T
me0nline 9a2d77ffec
Build and Push Fridger Container / Build & Push Fridger Image (push) Failing after 31s
ci(docker): add production dockerfile, compose config, and gitea actions pipeline
2026-10-10 22:38:01 +02:00

65 lines
2.4 KiB
YAML

name: Build and Push Fridger Container
on:
push:
branches:
- main
paths-ignore:
- 'README.md'
- '.gitignore'
workflow_dispatch:
jobs:
build-and-push:
name: Build & Push Fridger Image
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- 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.GITEAUSER || secrets.PACKAGESUSER || github.actor }}"
PASS="${{ secrets.GITEATOKEN || secrets.PACKAGESTOKEN || secrets.TAG_TOKEN || github.token }}"
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/fridger:latest"
echo "Building ${IMAGE_TAG}..."
docker build \
-t "${IMAGE_TAG}" \
-f Dockerfile \
.
- name: Push to Gitea Container Registry
run: |
IMAGE_TAG="gitea.eibl.tech/me0nline/fridger:latest"
echo "Pushing ${IMAGE_TAG} to Gitea Container Registry..."
docker push "${IMAGE_TAG}"
echo "Successfully pushed ${IMAGE_TAG} to Gitea Container Registry!"
- name: Clean up temporary base images from Docker host
if: always()
run: |
echo "[*] Cleaning up temporary base images from Docker host daemon..."
docker images --filter "reference=*bullseye*" -q | xargs -r docker rmi -f 2>/dev/null || true
docker rmi -f node:16-bullseye node:16-bullseye-slim 2>/dev/null || true
docker image prune -f 2>/dev/null || true
echo "[+] Cleaned up intermediate build images from host daemon."