https://github.com/jaredreisinger/semantic-release-image
semantic-release, encapsulated in a Docker image
https://github.com/jaredreisinger/semantic-release-image
Last synced: 4 months ago
JSON representation
semantic-release, encapsulated in a Docker image
- Host: GitHub
- URL: https://github.com/jaredreisinger/semantic-release-image
- Owner: JaredReisinger
- License: mit
- Created: 2019-09-07T07:48:05.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-01-08T19:31:48.000Z (over 5 years ago)
- Last Synced: 2025-10-26T23:32:56.106Z (8 months ago)
- Language: Dockerfile
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# semantic-release(-image)
A generally-up-to-date image containing [semantic-release](https://semantic-release.gitbook.io/semantic-release/) and most official and community plugins, good for use in containerized CI/CD pipelines!
> _**Update:** Several of the community plugins have started exhibiting dependency resolution issues with semantic-release, so I have commented them out in the interest of keeping the image updated to the core semantic-release builds. Please log an issue if this causes a problem, or feel free to fork this repo to have your own customized semantic-release image._
## Usage
The image assumes that `/source` is the working directory, and has `semantic-release` as the default ENTRYPOINT, so you can verify things are working with:
```shell
docker run --rm -ti -v .:/source -e GITHUB_TOKEN=YOUR-TOKEN-HERE jaredreisinger/semantic-release --dry-run
```
(with _your_ token in place of `YOUR-TOKEN-HERE`, of course)... and you should see the regular dry-run output from semantic-release. Depending on the plugins your `.releaserc` specifies, you may need other environment variables defined.
#### In a CI/CD pipeline
Using [Drone](https://drone.io) as an example, you can create a release step as simply as:
```yaml
# . . .
steps:
# . . .
- name: release
image: jaredreisinger/semantic-release
environment:
GITHUB_TOKEN:
from_secret: github_token
```
(Assuming here that `github_token` has already been set up as a Drone repository or organization secret.) If you have a `.releaserc` file, your chosen plugins and configuration will magically be used. Also note that Drone binds the source directory to the image and sets that directory as the current working one, so there's no need to specifically mount into `/source`. This should be true of any Docker-based CI/CD.
## Notes
Given the sheer number of plugins, I've decided to simply include everything as "latest".
Even though normal Dockerfile practice is to combine RUN commands to reduce the number of layers, we take advantage of caching by separating these out, and attempting to put the more-stable and less-often-updated components first.