An open API service indexing awesome lists of open source software.

https://github.com/joschi/forgejo-runner-nix-containers

Container images intended to be used with Forgejo Runners
https://github.com/joschi/forgejo-runner-nix-containers

containers forgejo-runner nix nixos

Last synced: 5 months ago
JSON representation

Container images intended to be used with Forgejo Runners

Awesome Lists containing this project

README

          

# Nix containers for Forgejo Actions

> Nix containers for usage with Forgejo Actions

There are currently two container images, one with the standard [Nix][nix] implementation and one with [Lix][lix].

## Components

- [Attic][attic]
- [Bash][bash]
- [BusyBox][busybox]
- [Cachix][cachix]
- [curl][curl]
- [Nix][nix] or [Lix][lix] with [flakes][flakes] enabled
- [Git][git] with [LFS][lfs]
- [Node.js][nodejs]
- [Forgejo CLI client][forgejo-cli]

[attic]: https://docs.attic.rs
[bash]: https://gnu.org/software/bash
[busybox]: https://busybox.net/
[cachix]: https://cachix.org
[curl]: https://curl.se
[nix]: https://nixos.org
[lix]: https://lix.systems
[flakes]: https://wiki.nixos.org/wiki/Flakes
[git]: https://git-scm.com
[lfs]: https://git-lfs.com
[nodejs]: https://nodejs.org
[forgejo-cli]: https://codeberg.org/forgejo-contrib/forgejo-cli

## Configuration

The containers can be used with Forgejo Actions by setting up the appropriate labels in the [configuration file][forgejo-runner-config-yaml] or the `.runner` file:

`config.yml`
```yaml
runner:
labels:
- "nix-latest:docker://ghcr.io/joschi/forgejo-nix:latest"
- "lix-latest:docker://ghcr.io/joschi/forgejo-lix:latest"
```

`.runner`
```json
{
"WARNING": "This file is automatically generated by act-runner. Do not edit it manually unless you know what you are doing. Removing this file will cause act runner to re-register as a new runner.",
"id": 42,
"uuid": "d2ax6368-9c20-4dy0-9a5a-e09c53854zb5",
"name": "my-forgejo-runner",
"token": "864e6019009e1635d98adf3935b305d32494d42a",
"address": "https://code.forgejo.org/",
"labels": [
"nix-latest:docker://ghcr.io/joschi/forgejo-nix:latest",
"lix-latest:docker://ghcr.io/joschi/forgejo-lix:latest"
]
}
```

[forgejo-runner-config-yaml]: https://forgejo.org/docs/latest/admin/actions/runner-installation/#configuration

## Verification

The built container images can be verified with `cosign` using the [public key in `cosign.pub`](cosign.pub):

```shell
cosign verify --key cosign.pub ghcr.io/joschi/forgejo-nix:latest
```

It can also be verified against GitHub directly:

```shell
cosign verify ghcr.io/joschi/forgejo-nix:latest --certificate-oidc-issuer https://token.actions.githubusercontent.com --certificate-identity-regexp="https://github.com/joschi/forgejo-runner-nix-containers"
```

## Credits

This project has been greatly inspired by and is based on https://codeberg.org/nix-actions/container
by [Jan Baudisch](https://codeberg.org/janbaudisch).