https://github.com/sillsdev/gha-ubuntu-packaging
A GitHub action to build Ubuntu packages.
https://github.com/sillsdev/gha-ubuntu-packaging
Last synced: about 1 month ago
JSON representation
A GitHub action to build Ubuntu packages.
- Host: GitHub
- URL: https://github.com/sillsdev/gha-ubuntu-packaging
- Owner: sillsdev
- License: mit
- Created: 2022-12-09T15:07:04.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-10-17T09:56:41.000Z (6 months ago)
- Last Synced: 2026-01-02T13:54:39.067Z (4 months ago)
- Language: Shell
- Size: 49.8 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Debian packaging
A GitHub action to build Ubuntu packages.
## Documentation
### Inputs
#### `flavor`
The name of the distribution, i.e. Ubuntu or Debian. Defaults to `ubuntu`.
#### `dist`
**Required** The name of a Ubuntu version, either code name (e.g. `jammy`)
or release (e.g. `22.04`). Default: `latest`.
#### `sourcepackage`
**Required** The name (and relative path) of the .dsc file.
#### `platform`
The platform to build on. One of `amd64` or `386` (or one of the other
OS/ARCH combinations from without
leading `linux/`). Defaults to `amd64`.
#### `source_dir`
The path to the directory that contains the .dsc file, relative to
`$GITHUB_WORKSPACE`. Defaults to `.`.
#### `result_dir`
The path to the directory where the built .deb files get copied to, relative
to `$GITHUB_WORKSPACE`. Defaults to `artifacts`.
#### `enable_llso`
`true` to enable the llso package repo (),
otherwise `false`. Defaults to `true`.
#### `enable_pso`
`true` to enable the pso package repo (),
otherwise `false`. Defaults to `true`.
#### `deb_fullname`
The full name used for the changelog entry. Defaults to `SIL GHA Packager`.
#### `deb_email`
The email address used for the changelog entry. Defaults to `undelivered@sil.org`.
#### `prerelease_tag`
A pre-release tag to add to the version number. This tag can include the
`GITHUB_RUN_NUMBER` and `GITHUB_RUN_ATTEMPT`, e.g. `~PR-1234-1.1`.
### Example usage
```yaml
...
steps:
- uses: sillsdev/gha-ubuntu-packaging@v1
with:
dist: 'jammy'
sourcepackage: ${{sourcepackage}}
...
```
See [PACKAGING.md](PACKAGING.md) for a detailed example.
## Manual package builds in a Docker container
The files in this directory also allow to manually build a package in
a docker container.
This can either be done by building a docker image and then running
the `build-package.sh` script inside the docker container, or by using
`local-build.sh` which combines these two steps.
### Using `local-build.sh`
`local-build.sh` takes two mandatory parameters: the Ubuntu version, and
the path and name of the .dsc file to build.
```bash
./local-build.sh jammy ~/ibus/packages/ibus_1.5.26-4sil1.1~jammy.dsc
```
### Building Docker image and running `build-package.sh`
#### 1. Build image
```bash
docker build --build-arg DIST=jammy --build-arg PLATFORM=amd64 -t sillsdev/jammy .
```
`jammy` and `amd64` are the Ubuntu version and platform for which to build the
package.
#### 2. Build binary package
Change into the directory which contains the source package, then run:
```bash
docker run -v $(pwd):/source -i -t -w /source --platform=linux/amd64 \
sillsdev/jammy jammy ibus_1.5.26-4sil1.1~jammy.dsc .
```
`ibus_1.5.26-4sil1.1~jammy.dsc` is the name of the source package. The
resulting .deb files will be in `$(pwd)/artifacts`.