Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/publish-podman-runner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Publish podman-enabled actions-runner image

# PromptExecution fork addition: builds images/Dockerfile (upstream actions/runner
# image + podman/uidmap/fuse-overlayfs baked in) and pushes it to this fork's own
# GHCR namespace. Not the upstream release-branch-driven docker-publish.yml --
# this just tracks main directly on our own image tag.

on:
push:
branches: [main]
paths:
- images/Dockerfile
- .github/workflows/publish-podman-runner.yml
workflow_dispatch:
inputs:
runner_version:
description: "actions/runner release version to bundle (no leading v)"
required: true
default: "2.336.0"

jobs:
publish-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/actions-runner-podman
RUNNER_VERSION: ${{ github.event.inputs.runner_version || '2.336.0' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3

- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push image
uses: docker/build-push-action@v6
with:
context: ./images
platforms: linux/amd64
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:runner-${{ env.RUNNER_VERSION }}
build-args: |
RUNNER_VERSION=${{ env.RUNNER_VERSION }}
push: true
labels: |
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
org.opencontainers.image.description=actions/runner ${{ env.RUNNER_VERSION }} with podman/uidmap/fuse-overlayfs baked in for rootless self-hosted podman-based CI
9 changes: 9 additions & 0 deletions images/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ RUN add-apt-repository ppa:git-core/ppa \
&& apt install -y git \
&& rm -rf /var/lib/apt/lists/*

# PromptExecution fork addition: bake in podman so CI jobs on this runner
# don't need to self-install it per-run. Ubuntu 24.04 (noble) ships podman
# in the default repos, no PPA needed (unlike git above). uidmap/fuse-overlayfs
# are needed for rootless podman's user-namespace + storage-driver fallback,
# since this runs as non-root "runner" inside an already-rootless podman pod.
RUN apt update -y \
&& apt install -y --no-install-recommends podman uidmap fuse-overlayfs \
&& rm -rf /var/lib/apt/lists/*

RUN adduser --disabled-password --gecos "" --uid 1001 runner \
&& groupadd docker --gid 123 \
&& usermod -aG sudo runner \
Expand Down