Zum Inhalt springen

Docker

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

semrel is available as an official Docker image at ghcr.io/SemRels/semrel.

TagBaseNotes
ghcr.io/SemRels/semrel:latestdistrolessMinimal, no shell. Requires git in host or mount.
ghcr.io/SemRels/semrel:1.4.0distrolessVersion-pinned distroless
ghcr.io/SemRels/semrel:latest-alpineAlpine 3Includes git, ca-certificates, shell
ghcr.io/SemRels/semrel:1.4.0-alpineAlpine 3Version-pinned Alpine
Terminal window
# Dry run in current directory
docker run --rm \
-v "$(pwd):/workspace" \
-w /workspace \
-e GITHUB_TOKEN="$GITHUB_TOKEN" \
ghcr.io/SemRels/semrel:latest-alpine release --dry-run
jobs:
release:
runs-on: ubuntu-latest
container:
image: ghcr.io/SemRels/semrel:latest-alpine
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run semrel
run: semrel release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Or use it as a Docker action:

- name: Run semrel
uses: docker://ghcr.io/SemRels/semrel:latest-alpine
with:
args: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
semrel:
image: ghcr.io/SemRels/semrel:latest-alpine
stage: release
script:
- semrel release --gitlab-dotenv semrel.env
artifacts:
reports:
dotenv: semrel.env

The container inherits all environment variables from the host or CI job. Pass secrets via -e or CI secret management:

VariableRequiredDescription
GITHUB_TOKENFor GitHub providerGitHub API token
GITLAB_TOKENFor GitLab providerGitLab API token
SEMREL_DRY_RUNNoSet to true to simulate

semrel operates on the current working directory. Mount your repository to /workspace:

Terminal window
docker run --rm \
-v "$(pwd):/workspace" \
-w /workspace \
-e GITHUB_TOKEN="$GITHUB_TOKEN" \
ghcr.io/SemRels/semrel:latest-alpine release

Pin to a specific version for reproducible builds:

Terminal window
ghcr.io/SemRels/semrel:1.0.0-alpine