Files
Madison Grubb 7df63f21aa fixes to imagen
2026-03-13 11:17:38 -04:00

80 lines
2.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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 repos 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`)
- **Base image:** `buildpack-deps` ([overview](https://hub.docker.com/_/buildpack-deps), [tags](https://hub.docker.com/_/buildpack-deps/tags), [source](https://github.com/docker-library/buildpack-deps))
## 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 workflows `runs-on` image.
## License
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