# Docker images for act Ubuntu-based images for [nektos/act][nektos/act], kept small while staying compatible with most GitHub Actions. ## Images Built from [`scripts/act.sh`](./scripts/act.sh). Published to this repo’s Gitea registry: - **Registry:** `git.keligrubb.com` - **Image:** `git.keligrubb.com/actions/ubuntu` - **Tags:** `act-22.04`, `act-24.04`, `act-latest` (and dated tags e.g. `act-24.04-YYYYMMDD`) ## When images are updated - Dependencies required for actions change - Changes to GitHub Actions, Act, or the container registry - Size or performance improvements ## Build locally You can build and push from this repo without using CI. **Prereqs:** Docker with `buildx`, and push access to your registry (e.g. `git.keligrubb.com`). **1. Set env (repo root):** ```sh export IMAGE_LABEL_OWNER="actions" export IMAGE_LABEL_REPO="ubuntu" export SLUG="actions/ubuntu" export DISTRO="ubuntu" export TYPE="act" export RUNNER="root" export NODE="20 24" export PLATFORMS="linux/amd64,linux/arm64" export FROM_IMAGE="buildpack-deps" export FROM_TAG="24.04" export TAG="act-24.04" export LATEST_TAG="act-latest" export PART_TAG="$(date +%Y%m%d)" export BUILD_TAG="${TAG}" export BUILD_TAG_VERSION="${PART_TAG}" export BUILD_REF="$(git rev-parse HEAD 2>/dev/null || echo unknown)" ``` **2. Log in to your registry:** ```sh docker login git.keligrubb.com ``` **3. Build and push:** ```sh tags="" tags="${tags} git.keligrubb.com/${SLUG}:${TAG}-${PART_TAG}" tags="${tags} git.keligrubb.com/${SLUG}:${LATEST_TAG}-${PART_TAG}" tags="${tags} git.keligrubb.com/${SLUG}:${TAG}" tags="${tags} git.keligrubb.com/${SLUG}:${LATEST_TAG}" ./build.sh --push --tags ${tags} ``` This builds the root `Dockerfile` (which runs `scripts/act.sh`), then pushes to each tag. For a local build only (no push), run `./build.sh`. **4. Use with act** Point act at your image, e.g.: ```sh act -P ubuntu-latest=git.keligrubb.com/actions/ubuntu:act-24.04 ``` Or put the image in `.actrc` or your workflow’s `runs-on` image. ## Customising Edit [`scripts/act.sh`](./scripts/act.sh) to add or remove packages. Keep `DISTRO=ubuntu`, `TYPE=act`, and a valid `RUNNER` user, then re-run the build steps above. ## Licence Parts of this repository are from [actions/virtual-environments][actions/virtual-environments], used under the [MIT License](https://github.com/actions/virtual-environments/blob/main/LICENSE). [nektos/act]: https://github.com/nektos/act [actions/virtual-environments]: https://github.com/actions/virtual-environments