-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve docker labels and move safe git dir to entrypoint
- Loading branch information
1 parent
3ea35ae
commit 187a98c
Showing
2 changed files
with
20 additions
and
3 deletions.
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 |
---|---|---|
|
@@ -14,7 +14,6 @@ COPY --from=composer:2 /usr/bin/composer /usr/bin/composer | |
RUN apk add --no-cache --update git && \ | ||
git --version && \ | ||
composer --version && \ | ||
git config --global --add safe.directory /github/workspace && \ | ||
COMPOSER_BIN_DIR="/usr/bin" composer global require --no-cache scrutinizer/ocular:${RELEASE_VERSION} && \ | ||
composer global show scrutinizer/ocular 2>/dev/null && \ | ||
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" \ | |
org.label-schema.vcs-url="https://github.com/sudo-bot/action-scrutinizer.git" \ | ||
org.label-schema.vcs-ref=${VCS_REF} \ | ||
org.label-schema.build-date=${BUILD_DATE} \ | ||
org.label-schema.docker.schema-version="1.0" | ||
org.label-schema.docker.schema-version="1.0" \ | ||
\ | ||
com.docker.extension.publisher-url="https://github.com/wdes" \ | ||
\ | ||
org.opencontainers.image.title="Scrutinizer coverage action" \ | ||
org.opencontainers.image.description="Scrutinizer coverage action for GitHub actions" \ | ||
org.opencontainers.image.authors="[email protected]" \ | ||
org.opencontainers.image.url="https://github.com/sudo-bot/action-scrutinizer#readme" \ | ||
org.opencontainers.image.documentation="https://github.com/sudo-bot/action-scrutinizer#readme" \ | ||
org.opencontainers.image.source="https://github.com/sudo-bot/action-scrutinizer" \ | ||
org.opencontainers.image.vendor="Sudo-Bot" \ | ||
org.opencontainers.image.licenses="MPL-2.0" \ | ||
org.opencontainers.image.created=${BUILD_DATE} \ | ||
org.opencontainers.image.version=${RELEASE_VERSION} \ | ||
org.opencontainers.image.revision=${VCS_REF} \ | ||
org.opencontainers.image.ref.name="latest" | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
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,13 +1,16 @@ | ||
#!/bin/sh -l | ||
|
||
## | ||
# @license http://unlicense.org/UNLICENSE The UNLICENSE | ||
# @author William Desportes <[email protected]> | ||
## | ||
|
||
set -e | ||
set -eu | ||
|
||
CLI_ARGS="$1" | ||
|
||
echo "::debug CLI_ARGS: ${CLI_ARGS}" | ||
|
||
git config --global --add safe.directory $PWD | ||
|
||
ocular code-coverage:upload ${CLI_ARGS} |