Skip to content

Commit 187a98c

Browse files
committed
Improve docker labels and move safe git dir to entrypoint
1 parent 3ea35ae commit 187a98c

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

docker/Dockerfile

+16-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
1414
RUN apk add --no-cache --update git && \
1515
git --version && \
1616
composer --version && \
17-
git config --global --add safe.directory /github/workspace && \
1817
COMPOSER_BIN_DIR="/usr/bin" composer global require --no-cache scrutinizer/ocular:${RELEASE_VERSION} && \
1918
composer global show scrutinizer/ocular 2>/dev/null && \
2019
RELEASE_VERSION="$(php -r "require_once '/root/.composer/vendor/autoload.php';echo \Composer\InstalledVersions::getVersion('scrutinizer/ocular');")" && \
@@ -34,6 +33,21 @@ LABEL org.label-schema.vendor="Sudo-Bot" \
3433
org.label-schema.vcs-url="https://github.com/sudo-bot/action-scrutinizer.git" \
3534
org.label-schema.vcs-ref=${VCS_REF} \
3635
org.label-schema.build-date=${BUILD_DATE} \
37-
org.label-schema.docker.schema-version="1.0"
36+
org.label-schema.docker.schema-version="1.0" \
37+
\
38+
com.docker.extension.publisher-url="https://github.com/wdes" \
39+
\
40+
org.opencontainers.image.title="Scrutinizer coverage action" \
41+
org.opencontainers.image.description="Scrutinizer coverage action for GitHub actions" \
42+
org.opencontainers.image.authors="[email protected]" \
43+
org.opencontainers.image.url="https://github.com/sudo-bot/action-scrutinizer#readme" \
44+
org.opencontainers.image.documentation="https://github.com/sudo-bot/action-scrutinizer#readme" \
45+
org.opencontainers.image.source="https://github.com/sudo-bot/action-scrutinizer" \
46+
org.opencontainers.image.vendor="Sudo-Bot" \
47+
org.opencontainers.image.licenses="MPL-2.0" \
48+
org.opencontainers.image.created=${BUILD_DATE} \
49+
org.opencontainers.image.version=${RELEASE_VERSION} \
50+
org.opencontainers.image.revision=${VCS_REF} \
51+
org.opencontainers.image.ref.name="latest"
3852

3953
ENTRYPOINT ["/entrypoint.sh"]

docker/entrypoint.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
#!/bin/sh -l
2+
23
##
34
# @license http://unlicense.org/UNLICENSE The UNLICENSE
45
# @author William Desportes <[email protected]>
56
##
67

7-
set -e
8+
set -eu
89

910
CLI_ARGS="$1"
1011

1112
echo "::debug CLI_ARGS: ${CLI_ARGS}"
1213

14+
git config --global --add safe.directory $PWD
15+
1316
ocular code-coverage:upload ${CLI_ARGS}

0 commit comments

Comments
 (0)