Docker image wrappers for release-it
The base image includes the release-it tool only. To use the image:
docker run -it ghcr.io/rcwbr/release-it-docker:0.1.0
The container entrypoint is the release-it
CLI executable.
The conventional-changelog image includes the conventional-changelog release-it plugin. To use the image:
docker run -it ghcr.io/rcwbr/release-it-docker-conventional-changelog:0.1.0
The file-bumper image includes the bumper release-it plugin. To use the image:
docker run -it ghcr.io/rcwbr/release-it-docker-file-bumper:0.1.0
If using the default configuration, it is configured to bump versions in a plaintext VERSION
file. By default, it will replace the entire contents of the file with the version number.
⚠️ Unlike the other images, the bumper release-it default configuration setsgit.commit
true (as the version file bump must be committed) andgit.pushArgs
to["tags"]
so as to push the tag only and not commit to the default branch. It also configuresgit.getLatestTagFromAllRefs
true so that the latest tag may still be discovered despite not being associated with a commit on the default branch.
Both the base and conventional-changelog images provide a default release-it configuration, located at /.release-it.json
. To use this config, provide an arg to release-it:
docker run -it ghcr.io/rcwbr/release-it-docker:0.1.0 --config /.release-it.json
The recommended approach to apply this image in a GitHub workflow is via the reusable release-it-gh-workflow.
The recommended method to build the image is using Docker Bake and the Dockerfile partials GitHub cache bake file. The steps to build the image using this method are as follows.
Prepare a Docker builder with the docker-container driver:
docker builder create --use --bootstrap --driver docker-container
Authenticate to GitHub container registry (see instructions):
echo $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin
Build the image:
cd base
REGISTRY=ghcr.io/rcwbr/ IMAGE_NAME=release-it-docker docker buildx bake --file github-cache-bake.hcl 'https://github.com/rcwbr/dockerfile-partials.git#main'
cd conventional-changelog
REGISTRY=ghcr.io/rcwbr/ IMAGE_NAME=release-it-docker-conventional-changelog docker buildx bake --file github-cache-bake.hcl --file cwd://docker-bake.hcl 'https://github.com/rcwbr/dockerfile-partials.git#main'
This repo uses the release-it-gh-workflow, with the conventional-changelog image defined at any given ref, as its automation.
The GitHub repo settings for this repo are defined as code using the Probot settings GitHub App. Settings values are defined in the .github/settings.yml
file. Enabling automation of settings via this file requires installing the app.
The settings applied are as recommended in the release-it-gh-workflow usage, including tag and branch protections, GitHub App and environment authentication, and required checks.