Compare commits

4 Commits

Author SHA1 Message Date
9b2d406942 chore: move to tagging builds
Some checks failed
Build Docker Image / build-docker (push) Failing after 2m35s
2025-08-31 16:48:50 +10:00
33538d5a98 chore: add PATH to Dockerfile for ansible and bundle
All checks were successful
/ build-docker (push) Successful in 3m1s
2025-08-31 16:03:27 +10:00
e2cabfdcf9 chore: add renovatebot
All checks were successful
/ build-docker (push) Successful in 4m38s
2025-08-31 16:02:42 +10:00
0b49b64f36 chore: Setup virtual python environment for ansible
All checks were successful
/ build-docker (push) Successful in 2m58s
2025-08-31 14:11:03 +10:00
3 changed files with 89 additions and 32 deletions

View File

@ -1,23 +1,42 @@
on: push name: Build Docker Image
on:
push:
# Only build on tags (like v1.0.0)
tags:
- "v*"
jobs: jobs:
build-docker: build-docker:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: catthehacker/ubuntu:act-latest image: catthehacker/ubuntu:act-latest
steps: steps:
# 1. Checkout the repo
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0
# 2. Set up Docker Buildx
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Login to DockerHub # 3. Log in to your registry
- name: Login to Docker registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: git.comprofix.com registry: git.comprofix.com
username: ${{ secrets.REGISTRY_USERNAME }} username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }} password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push # 4. Build and push Docker image
- name: Build and push Docker image
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
file: ./Dockerfile file: ./Dockerfile
push: true push: true
tags: git.comprofix.com/mmckinnon/debian-runner:latest tags: |
git.comprofix.com/mmckinnon/debian-runner:latest
git.comprofix.com/mmckinnon/debian-runner:${{ github.ref_name }}

View File

@ -1,42 +1,61 @@
# Base image # ==============================
FROM debian:trixie-slim # Stage 1: Builder
# ==============================
FROM debian:trixie-slim@sha256:c85a2732e97694ea77237c61304b3bb410e0e961dd6ee945997a06c788c545bb AS builder
# Set environment variables for noninteractive install
ENV DEBIAN_FRONTEND=noninteractive \
LANG=C.UTF-8
# Install build and runtime dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 python3-venv build-essential \
curl git bash openssh-client \
ruby-full zlib1g-dev libffi-dev libssl-dev ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Install Node.js 22 (latest patch for 22.x)
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g npm \
&& rm -rf /var/lib/apt/lists/*
# Install Ruby gems: Jekyll and Bundler
RUN gem install bundler jekyll
# Create Python virtual environment for Ansible
RUN python3 -m venv /opt/venv \
&& /opt/venv/bin/pip install --no-cache-dir --upgrade pip ansible==8.*
# ==============================
# Stage 2: Runtime
# ==============================
FROM debian:trixie-slim@sha256:c85a2732e97694ea77237c61304b3bb410e0e961dd6ee945997a06c788c545bb
# Set environment variables # Set environment variables
ENV DEBIAN_FRONTEND=noninteractive \ ENV DEBIAN_FRONTEND=noninteractive \
LANG=C.UTF-8 \ LANG=C.UTF-8 \
PATH=/usr/local/bundle/bin:$PATH PATH=/usr/local/bundle/bin:/opt/venv/bin:$PATH
# Install dependencies # Install minimal runtime dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update && apt-get install -y --no-install-recommends \
curl \ python3 python3-venv \
git \ curl git bash openssh-client \
bash \ ruby-full ca-certificates \
openssh-client \ nodejs \
python3 \
python3-pip \
build-essential \
zlib1g-dev \
libffi-dev \
libssl-dev \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# Install Node.js 22 # Copy built tools from builder
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \ COPY --from=builder /opt/venv /opt/venv
&& apt-get install -y nodejs \ COPY --from=builder /usr/local/bundle /usr/local/bundle
&& npm install -g npm COPY --from=builder /usr/lib/node_modules /usr/lib/node_modules
COPY --from=builder /usr/bin/node /usr/bin/node
# Install Ansible via pip
RUN pip3 install --no-cache-dir ansible
# Install Ruby and Jekyll
RUN apt-get update && apt-get install -y --no-install-recommends \
ruby-full \
&& gem install bundler jekyll \
&& rm -rf /var/lib/apt/lists/*
# Create workspace # Create workspace
WORKDIR /workspace WORKDIR /workspace
# Default shell # Default shell
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
# Expose environment for scripts
ENV PATH="/opt/venv/bin:/usr/local/bundle/bin:$PATH"

19
renovate.json Normal file
View File

@ -0,0 +1,19 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
"renovatebot/renovate-config",
":semanticCommitTypeAll(chore)"
],
"automerge": true,
"automergeType": "branch",
"automergeStrategy": "rebase",
"commitBodyTable": true,
"ignoreTests": true,
"major": {
"automerge": false,
"dependencyDashboardApproval": true,
"commitMessagePrefix": "chore(deps-major): ",
"labels": ["dependencies", "breaking"]
}
}