Task: Fixed docker yarn and github actions

This commit is contained in:
Sambo Chea 2021-07-14 18:18:37 +07:00
parent bb96ee0736
commit 65e48f3591
3 changed files with 10 additions and 4 deletions

View File

@ -12,4 +12,4 @@ jobs:
- name: Starter Docker Yarn Test
uses: cubetiq/starter-docker-yarn-actions@main
with:
run: docker version; node --version; yarn --version
run: docker version; echo Node: $(node --version); echo Yarn: $(yarn --version)

View File

@ -1,4 +1,5 @@
FROM cubetiq/calpine-docker:latest
FROM cubetiq/calpine-docker-yarn:latest
LABEL maintainer="sombochea@cubetiqs.com"
COPY ./entrypoint.sh /entrypoint.sh

View File

@ -1,5 +1,9 @@
#!/bin/sh
#### Current working directory is: /github/workspace ####
WORKDIR=$(pwd)
echo "Working directory => $WORKDIR"
if [ ! -z $INPUT_USERNAME ];
then echo $INPUT_PASSWORD | docker login $INPUT_REGISTRY -u $INPUT_USERNAME --password-stdin
fi
@ -15,11 +19,12 @@ then INPUT_SHELL=sh
fi
if [ -z $INPUT_IMAGE ];
then INPUT_IMAGE=cubetiq/calpine-docker-yarn
then INPUT_IMAGE=cubetiq/calpine-docker-yarn:latest
fi
if [ -z $semicolon_delimited_script ];
then semicolon_delimited_script="echo $(whoami)"
fi
exec docker run -v "/var/run/docker.sock":"/var/run/docker.sock" $INPUT_OPTIONS --entrypoint=$INPUT_SHELL $INPUT_IMAGE -c "`cat semicolon_delimited_script`"
exec $INPUT_SHELL semicolon_delimited_script
# exec docker run --workdir $WORKDIR -v "$WORKDIR":"$WORKDIR" -v "/var/run/docker.sock":"/var/run/docker.sock" $INPUT_OPTIONS --entrypoint=$INPUT_SHELL $INPUT_IMAGE -c "`cat semicolon_delimited_script`"