matrix:
lws-version: [3.2.0, 3.1.0, 2.4.2]
steps:
- - name: install apt packages
+ - name: Install packages
run: |
sudo apt-get update
sudo apt-get install build-essential cmake libjson-c-dev libssl-dev libuv1-dev
- - name: compile libwebsockets-${{ matrix.lws-version }} from source
+ - name: Install libwebsockets-${{ matrix.lws-version }}
env:
LWS_VERSION: ${{ matrix.lws-version }}
run: |
cmake -DLWS_WITH_LIBUV=ON -DLWS_UNIX_SOCK=ON -DLWS_IPV6=ON -DLWS_WITHOUT_TESTAPPS=ON -DCMAKE_BUILD_TYPE=RELEASE .
make && sudo make install && sudo ldconfig
- uses: actions/checkout@v1
- - name: build ttyd
+ - name: Build ttyd
run: |
cmake -DCMAKE_BUILD_TYPE=RELEASE .
make && sudo make install
arch: [i386, x86_64, arm, armhf, mips, mipsel]
steps:
- uses: actions/checkout@v1
- - name: cross build (${{ matrix.arch }})
+ - name: Cross build (${{ matrix.arch }})
env:
ARCH: ${{ matrix.arch }}
run: docker run --rm -v $(pwd):/ttyd -w /ttyd tsl0922/musl-cross ./scripts/cross-build.sh $ARCH
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- - name: yarn install, check and build
+ - name: Run yarn install, check and build
run: |
cd html
yarn install
FROM tsl0922/musl-cross
-RUN git clone --depth=1 https://github.com/tsl0922/ttyd.git /tmp/ttyd \
- && cd /tmp/ttyd && ./scripts/cross-build.sh x86_64
+RUN git clone --depth=1 https://github.com/tsl0922/ttyd.git /ttyd \
+ && cd /ttyd && ./scripts/cross-build.sh x86_64
FROM ubuntu:18.04
-COPY --from=0 /tmp/ttyd/build/ttyd /usr/local/bin/ttyd
+COPY --from=0 /ttyd/build/ttyd /usr/bin/ttyd
-ENV TINI_VERSION v0.18.0
-ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
-RUN chmod +x /tini
+ADD https://github.com/krallin/tini/releases/download/v0.18.0/tini /sbin/tini
+RUN chmod +x /sbin/tini
EXPOSE 7681
-ENTRYPOINT ["/tini", "--"]
-CMD ["ttyd", "sh"]
+ENTRYPOINT ["/sbin/tini", "--"]
+CMD ["ttyd", "bash"]
FROM tsl0922/musl-cross
-RUN git clone --depth=1 https://github.com/tsl0922/ttyd.git /tmp/ttyd \
- && cd /tmp/ttyd && ./scripts/cross-build.sh x86_64
+RUN git clone --depth=1 https://github.com/tsl0922/ttyd.git /ttyd \
+ && cd /ttyd && ./scripts/cross-build.sh x86_64
-FROM alpine:3.9
-COPY --from=0 /tmp/ttyd/build/ttyd /usr/local/bin/ttyd
-RUN apk add --no-cache tini
+FROM alpine:3.10
+COPY --from=0 /ttyd/build/ttyd /usr/bin/ttyd
+RUN apk add --no-cache bash tini
EXPOSE 7681
ENTRYPOINT ["/sbin/tini", "--"]
-CMD ["ttyd", "sh"]
+CMD ["ttyd", "bash"]