From a6edeed90b194368f346693c8ef8a828fe86ee0e Mon Sep 17 00:00:00 2001 From: Jason Song Date: Mon, 1 Apr 2024 18:30:26 +0800 Subject: [PATCH] feat: support "full" --- .gitea/workflows/release.yaml | 39 ++++++++++++++++++++++++++++++ README.md | 15 ++++++++++-- dockerfiles/ubuntu-full.dockerfile | 19 +++++++++++++++ 3 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 dockerfiles/ubuntu-full.dockerfile diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index ae13547..3de6e43 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -112,3 +112,42 @@ jobs: tags: | gitea/runner-images:ubuntu-slim-20.04 gitea/runner-images:ubuntu-slim-20.04-${{ steps.meta.outputs.IMAGE_VERSION }} + + - name: Build and push full 22.04 + uses: docker/build-push-action@v5 + with: + context: . + file: dockerfiles/ubuntu.dockerfile + platforms: | + linux/amd64 + linux/arm64 + pull: true + push: true + build-args: | + BASE_IMAGE_TAG=full-22.04 + IMAGE_VERSION=${{ steps.meta.outputs.IMAGE_VERSION }} + IMAGE_CREATED=${{ steps.meta.outputs.IMAGE_CREATED }} + IMAGE_REVISION=${{ steps.meta.outputs.IMAGE_REVISION }} + tags: | + gitea/runner-images:ubuntu-22.04-full + gitea/runner-images:ubuntu-22.04-full-${{ steps.meta.outputs.IMAGE_VERSION }} + gitea/runner-images:ubuntu-latest-full + + - name: Build and push full 20.04 + uses: docker/build-push-action@v5 + with: + context: . + file: dockerfiles/ubuntu.dockerfile + platforms: | + linux/amd64 + linux/arm64 + pull: true + push: true + build-args: | + BASE_IMAGE_TAG=full-20.04 + IMAGE_VERSION=${{ steps.meta.outputs.IMAGE_VERSION }} + IMAGE_CREATED=${{ steps.meta.outputs.IMAGE_CREATED }} + IMAGE_REVISION=${{ steps.meta.outputs.IMAGE_REVISION }} + tags: | + gitea/runner-images:ubuntu-20.04-full + gitea/runner-images:ubuntu-20.04-${{ steps.meta.outputs.IMAGE_VERSION }} diff --git a/README.md b/README.md index 7a41253..f03ca25 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,11 @@ So, we build images from `catthehacker/ubuntu:*` or `node:*`, then install addit ## Images -We provide two kinds of images, "default" and "slim" (and maybe more like "full" in the future). +We provide three kinds of images, "default", "slim" and "full". ### Default images -Default images are based on `catthehacker/ubuntu:*`, and are used by default in act_runner. +Default images are based on `catthehacker/ubuntu:act-*`, and are used by default in act_runner. They contain most of the tools needed to run workflows and are always recommended if your runner is not disk-space constrained. | Tag | Base | Size | @@ -35,3 +35,14 @@ Their size is much smaller, which is friendly to disk-space constrained runners. | `gitea/runner-images:ubuntu-latest-slim` | `node:20-bookworm` | ![size](https://img.shields.io/docker/image-size/gitea/runner-images/ubuntu-latest-slim?label=size) | | `gitea/runner-images:ubuntu-22.04-slim` | `node:20-bookworm` | ![size](https://img.shields.io/docker/image-size/gitea/runner-images/ubuntu-22.04-slim?label=size) | | `gitea/runner-images:ubuntu-20.04-slim` | `node:20-bullseye` | ![size](https://img.shields.io/docker/image-size/gitea/runner-images/ubuntu-20.04-slim?label=size) | + +### Full images + +Full images are based on `catthehacker/ubuntu:full-*`, which contains all tools provided by GitHub Actions runners. +They have huge sizes, but are useful if you need to run workflows in a GitHub Actions compatible environment. + +| Tag | Base | Size | +|------------------------------------------|-----------------------------------|-----------------------------------------------------------------------------------------------------| +| `gitea/runner-images:ubuntu-latest-full` | `catthehacker/ubuntu:full-latest` | ![size](https://img.shields.io/docker/image-size/gitea/runner-images/ubuntu-latest-full?label=size) | +| `gitea/runner-images:ubuntu-22.04-full` | `catthehacker/ubuntu:full-22.04` | ![size](https://img.shields.io/docker/image-size/gitea/runner-images/ubuntu-22.04-full?label=size) | +| `gitea/runner-images:ubuntu-20.04-full` | `catthehacker/ubuntu:full-20.04` | ![size](https://img.shields.io/docker/image-size/gitea/runner-images/ubuntu-20.04-full?label=size) | diff --git a/dockerfiles/ubuntu-full.dockerfile b/dockerfiles/ubuntu-full.dockerfile new file mode 100644 index 0000000..27951c1 --- /dev/null +++ b/dockerfiles/ubuntu-full.dockerfile @@ -0,0 +1,19 @@ +ARG BASE_IMAGE_TAG + +FROM ghcr.io/catthehacker/ubuntu:${BASE_IMAGE_TAG} + +ARG IMAGE_CREATED +ARG IMAGE_VERSION +ARG IMAGE_REVISION + +LABEL org.opencontainers.image.created="${IMAGE_CREATED}" \ + org.opencontainers.image.authors="Gitea" \ + org.opencontainers.image.url="https://gitea.com/gitea/runner-images" \ + org.opencontainers.image.documentation="https://gitea.com/gitea/runner-images/src/branch/main/README.md" \ + org.opencontainers.image.source="https://gitea.com/gitea/runner-images" \ + org.opencontainers.image.version="${IMAGE_VERSION}" \ + org.opencontainers.image.revision="${IMAGE_REVISION}" \ + org.opencontainers.image.vendor="Gitea" \ + org.opencontainers.image.licenses="MIT" \ + org.opencontainers.image.title="Official Gitea Actions runner images" \ + org.opencontainers.image.description="Official docker images used by act_runner to run workflows."