File tree Expand file tree Collapse file tree 3 files changed +19
-31
lines changed
Expand file tree Collapse file tree 3 files changed +19
-31
lines changed Original file line number Diff line number Diff line change 1+ name : CI Build
2+ on : [push]
3+ jobs :
4+ build :
5+ runs-on : ubuntu-latest
6+ steps :
7+ - uses : actions/checkout@v2
8+ - name : Set up JDK 11
9+ uses : actions/setup-java@v2
10+ with :
11+ java-version : ' 11'
12+ distribution : ' adopt'
13+ - name : Build with Gradle
14+ run : ./gradlew build
Original file line number Diff line number Diff line change 1- FROM oracle/graalvm-ce:19.3.1-java11
1+ FROM ubuntu:focal
22
3- RUN yum install -y bash curl sudo wget tar
4-
5- RUN mkdir -p /opt && \
6- wget -qO- https://download.docker.com/linux/static/stable/x86_64/docker-17.12.1-ce.tgz | tar xvz -C /opt && \
7- ln -s /opt/docker/docker /usr/bin/docker
8-
9- RUN curl -L "https://github.com/docker/compose/releases/download/1.25.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/bin/docker-compose && \
10- chmod 755 /usr/bin/docker-compose
11-
12- RUN gu install native-image
13-
14- RUN yum install -y gcc glibc-devel zlib-devel
15-
16- CMD ["bash" ]
3+ RUN apt update && apt install -y sudo
Original file line number Diff line number Diff line change 22
33DIR=" $( cd " $( dirname " $0 " ) " ; pwd) " ;
44
5- IMG=$( docker build -q $DIR /.workbench)
6-
7- DOCKER_ARGS=" -it"
5+ IMG=" ubuntu:focal"
86
97if [ " $# " -eq 0 ]; then
108 CMD=bash
119else
1210 CMD=" $@ "
1311fi
1412
15- if [ ! -z " $CI_PROJECT_DIR " ]; then
16- CONTAINER_OPTS=" -v /root:/root -v /${CI_PROJECT_DIR} :/${CI_PROJECT_DIR} "
17- USER=root
18- else
19- CONTAINER_OPTS=" -v $HOME :$HOME -it"
20- fi
21-
2213docker run --rm \
2314 --net host \
2415 -v /etc/passwd:/etc/passwd \
@@ -28,11 +19,7 @@ docker run --rm \
2819 -e http_proxy=" $http_proxy " \
2920 -e https_proxy=" $https_proxy " \
3021 -e no_proxy=" $no_proxy " \
31- -e CI_COMMIT_REF_NAME=" $CI_COMMIT_REF_NAME " \
32- -e CI_COMMIT_TAG=" $CI_COMMIT_REF_NAME " \
33- -e DOCKERHUB_USERNAME=" $DOCKERHUB_USERNAME " \
34- -e DOCKERHUB_PASSWORD=" $DOCKERHUB_PASSWORD " \
3522 -v " ${DIR} " :/project \
3623 -v /var/run/docker.sock:/var/run/docker.sock \
37- $CONTAINER_OPTS $IMG \
38- sudo -u ${USER} -E sh -c " cd ${DIR} ; ${CMD} "
24+ -v $HOME : $HOME \
25+ -it $IMG sudo -u ${USER} -E sh -c " cd ${DIR} ; ${CMD} "
You can’t perform that action at this time.
0 commit comments