1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Actions: Fix GitHub actions warnings.

This commit is contained in:
winlin 2022-12-25 17:00:07 +08:00
parent f6e0b1c894
commit 23b7939574
6 changed files with 106 additions and 114 deletions

View file

@ -2,10 +2,13 @@ ARG ARCH
ARG IMAGE=ossrs/srs:ubuntu20
FROM ${ARCH}${IMAGE} AS build
ARG CONFARGS
ARG MAKEARGS
ARG INSTALLDEPENDS
ARG BUILDPLATFORM
ARG TARGETPLATFORM
ARG SRS_AUTO_PACKAGER
RUN echo "BUILDPLATFORM: $BUILDPLATFORM, TARGETPLATFORM: $TARGETPLATFORM, PACKAGER: ${#SRS_AUTO_PACKAGER}"
RUN echo "BUILDPLATFORM: $BUILDPLATFORM, TARGETPLATFORM: $TARGETPLATFORM, PACKAGER: ${#SRS_AUTO_PACKAGER}, CONFARGS: ${CONFARGS}, MAKEARGS: ${MAKEARGS}, INSTALLDEPENDS: ${INSTALLDEPENDS}"
# https://serverfault.com/questions/949991/how-to-install-tzdata-on-a-ubuntu-docker-image
ENV DEBIAN_FRONTEND noninteractive
@ -15,7 +18,9 @@ ENV DEBIAN_FRONTEND noninteractive
SHELL ["/bin/bash", "-c"]
# Install depends tools.
RUN apt-get update && apt-get install -y gcc make g++ patch unzip perl git libasan5
RUN if [[ $INSTALLDEPENDS != 'NO' ]]; then \
apt-get update && apt-get install -y gcc make g++ patch unzip perl git libasan5; \
fi
# Copy source code to docker.
COPY . /srs
@ -24,7 +29,7 @@ WORKDIR /srs/trunk
# Build and install SRS.
# Note that SRT is enabled by default, so we configure without --srt=on.
# Note that we have copied all files by make install.
RUN ./configure --gb28181=on --sanitizer-static=on && make && make install
RUN ./configure --gb28181=on --sanitizer-static=on ${CONFARGS} && make ${MAKEARGS} && make install
############################################################
# dist