@lukaswestholt/semantic-release-skopeo
v1.3.0
Published
This is a plugin for semantic-release that copies OCI images to a custom registry using daemonless open-source tool skopeo.
Maintainers
Readme
@lukaswestholt/semantic-release-skopeo
Overview
@lukaswestholt/semantic-release-skopeo is a plugin for semantic-release that copies OCI images to a custom registry using daemonless open-source tool skopeo.
From the skopeo docs:
skopeo is a command line utility that performs various operations on container images and image repositories. skopeo does not require a daemon to be running to perform its operations. Copying an image from and to various storage mechanisms. For example, you can copy images from one registry to another, without requiring privilege.
Benefits
- Daemonless: Copies images without requiring a Docker daemon or docker-in-docker setup, ideal for CI/CD environments.
- Version-Aware Tagging: Automatically tags your Docker images with semantic version numbers, ensuring consistency between your code and container versions.
- Cross-Platform Compatibility: Works across different CI/CD platforms and environments that support Node.js and skopeo.
- Automated Publishing: Pushes pre-built images to your specified Docker registry as part of the release process, reducing manual steps.
Quick Start
Installation is done with the npm install command:
npm install --save-dev @lukaswestholt/semantic-release-skopeoAdd the plugin to your semantic-release .releaserc file:
{
"branches": ["main"],
"plugins": [
"@semantic-release/commit-analyzer",
[
"@lukaswestholt/semantic-release-skopeo",
{
"source": "docker://registry.example.com/my-project/my-image:latest",
"destination": [
"docker://registry.example.com/my-project/my-image:${version}"
]
}
]
]
}This package must be run in an environment that has skopeo already installed. We provide an image with all the necessary dependencies pre-installed, which we strongly recommend using. Pull the container image:
docker pull ghcr.io/lukaswestholt/semantic-release-skopeo:latestRun your semantic-release command in the container:
docker run --rm \
-v $(pwd):/workspace \
-name semantic-release-skopeo-test \
ghcr.io/lukaswestholt/semantic-release-skopeo:latest \
npx semantic-releasePrivate registries
Just use skopeo login <...> in a pre-step. See https://github.com/containers/skopeo/blob/main/docs/skopeo-login.1.md.
Advanced Usage
For more advanced usage and detailed configuration options as well as guidance on multiple CI environments and documentation for all supported flags, please refer to the Usage Guide or the Configuration Guide.
Contributing
We welcome contributions to semantic-release-skopeo! Simply raise and Issue or a PR, and we can review it ASAP.
License
This project is licensed under the MIT License.
Acknowledgements
Templated from @bpgeck/semantic-release-kaniko.
Special thanks to the contributors and the open-source community for their invaluable support and contributions.
For more information, visit the official repository.
