-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Make entrypoint gitlab friendly
- Loading branch information
1 parent
2950bd6
commit 7a0d1f2
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
FROM alpine | ||
ARG VERSION | ||
|
||
ADD ./docker/entrypoint.sh /usr/local/bin/docker-entrypoint | ||
RUN apk update && apk add --no-cache git ca-certificates && update-ca-certificates | ||
COPY "./bin/semantic-release_v${VERSION}_linux_amd64" /usr/local/bin/semantic-release | ||
|
||
ENTRYPOINT ["semantic-release"] | ||
ENTRYPOINT ["docker-entrypoint"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
if [ "$GITLAB_CI" == "true" ]; then | ||
# Gitlab CI environment detected, skipping entrypoint | ||
exit 0 | ||
fi | ||
|
||
if [ "$1" == "semantic-release" ]; then | ||
# remove first argument | ||
shift 1 | ||
fi | ||
|
||
exec semantic-release "$@" |