first commit
This commit is contained in:
commit
46b20aa03d
4 changed files with 52 additions and 0 deletions
28
entrypoint.sh
Executable file
28
entrypoint.sh
Executable file
|
@ -0,0 +1,28 @@
|
|||
#!/bin/sh -ex
|
||||
|
||||
#shellcheck disable=SC1091
|
||||
[ -f .env ] && . ./.env
|
||||
|
||||
if [ -z "$IMAGEAPP" ]; then
|
||||
REGISTRY="$(echo "$GITHUB_SERVER_URL" | sed 's .*:// ')"
|
||||
IMAGEAPP="$REGISTRY/$INPUT_IMAGE"
|
||||
fi
|
||||
|
||||
if [ "$INPUT_CACHE" = true ]; then
|
||||
set -- --import-cache "type=registry,ref=$IMAGEAPP/cache" \
|
||||
--export-cache "type=registry,ref=$IMAGEAPP/cache"
|
||||
fi
|
||||
|
||||
cat <<EOF > "$DOCKER_CONFIG/config.json"
|
||||
{
|
||||
"auths": {
|
||||
"$GITHUB_SERVER_URL": {
|
||||
"username": "$INPUT_USERNAME",
|
||||
"password": "$INPUT_PASSWORD"
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
buildctl build "$@" -o "type=image,name=$IMAGEAPP,push=true" \
|
||||
--local context="$(dirname "$INPUT_DOCKERFILE")" \
|
||||
--local dockerfile="$INPUT_DOCKERFILE"
|
Loading…
Add table
Add a link
Reference in a new issue