From 32c79b49cc2500c0f29e1ca0cf4f24d252a9ebf1 Mon Sep 17 00:00:00 2001 From: winlin Date: Sat, 14 Aug 2021 20:38:01 +0800 Subject: [PATCH 1/8] Support Github Actions to publish SRS. 4.0.155 --- .github/workflows/codeql-analysis.yml | 31 +-------------------------- CHANGELOG.md | 1 + README.md | 2 +- trunk/src/core/srs_core_version4.hpp | 2 +- 4 files changed, 4 insertions(+), 32 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 2ccac42d8..c5e8b83c2 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,14 +1,3 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# name: "CodeQL" on: @@ -23,16 +12,13 @@ on: jobs: analyze: - name: Analyze + name: codeql-analyze runs-on: ubuntu-latest strategy: fail-fast: false matrix: language: [ 'cpp' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] - # Learn more: - # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed steps: - name: Checkout repository @@ -43,22 +29,7 @@ jobs: uses: github/codeql-action/init@v1 with: languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - #- name: Autobuild - # uses: github/codeql-action/autobuild@v1 - - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - name: Build SRS run: | cd trunk && ./configure && make diff --git a/CHANGELOG.md b/CHANGELOG.md index 973b1fedc..c724087ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The changelog for SRS. ## SRS 4.0 Changelog +* v4.0, 2021-08-14, Support Github Actions to publish SRS. 4.0.155 * v4.0, 2021-08-14, RTC: Merge [#2533](https://github.com/ossrs/srs/pull/2533), fix SDP comparison bug. 4.0.154 * v4.0, 2021-08-13, RTC: Merge [#2526](https://github.com/ossrs/srs/pull/2526), fix codec issue for G.711 or H.263. 4.0.152 * v4.0, 2021-08-10, RTC: Merge [#2509](https://github.com/ossrs/srs/pull/2514), support http hooks n_play/stop/publish/unpublish. 4.0.151 diff --git a/README.md b/README.md index 9434cfd60..38d9e2d81 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # SRS(Simple Realtime Server) ![](http://ossrs.net/gif/v1/sls.gif?site=github.com&path=/srs/4.0release) -[![](https://github.com/ossrs/srs/workflows/CodeQL/badge.svg)](https://github.com/ossrs/srs/actions?query=workflow%3ACodeQL) +[![](https://github.com/ossrs/srs/actions/workflows/codeql-analysis.yml/badge.svg?branch=4.0release)](https://github.com/ossrs/srs/actions?query=workflow%3ACodeQL+branch%3A4.0release) [![](https://circleci.com/gh/ossrs/srs/tree/4.0release.svg?style=svg&circle-token=1ef1d5b5b0cde6c8c282ed856a18199f9e8f85a9)](https://circleci.com/gh/ossrs/srs/tree/4.0release) [![](https://codecov.io/gh/ossrs/srs/branch/4.0release/graph/badge.svg)](https://codecov.io/gh/ossrs/srs/branch/4.0release) [![](https://gitee.com/winlinvip/srs-wiki/raw/master/images/wechat-badge.png)](../../wikis/Contact#wechat) diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index f55277c86..1763b5373 100644 --- a/trunk/src/core/srs_core_version4.hpp +++ b/trunk/src/core/srs_core_version4.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 4 #define VERSION_MINOR 0 -#define VERSION_REVISION 154 +#define VERSION_REVISION 155 #endif From becfb517bdf04523dfeafc7beef6691d4e94d190 Mon Sep 17 00:00:00 2001 From: winlin Date: Sat, 14 Aug 2021 20:46:52 +0800 Subject: [PATCH 2/8] Support Github Actions --- .github/workflows/release.yml | 75 +++++++++++++++++++++++++++++++++++ trunk/Dockerfile | 36 +++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 trunk/Dockerfile diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..00418403a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,75 @@ +name: "Release" + +on: + push: + tags: + - v3* + +jobs: + k8s: + name: release-k8s + runs-on: ubuntu-20.04 + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # The github.ref is, for example, refs/tags/v3.0.145 or refs/tags/v3.0-r8 + # Generate variables like: + # SRS_TAG=v3.0.145 + # SRS_TAG=v3.0-r8 + # SRS_MAJOR=3 + # @see https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable + - name: Generate varaiables + shell: bash + run: | + SRS_TAG=$(echo ${{ github.ref }}| awk -F '/' '{print $3}') + echo "SRS_TAG=$SRS_TAG" >> $GITHUB_ENV + SRS_MAJOR=$(echo $SRS_TAG| cut -c 2) + echo "SRS_MAJOR=$SRS_MAJOR" >> $GITHUB_ENV + + - name: Build SRS + shell: bash + run: | + echo "Release ossrs/srs:$SRS_TAG" + docker build --tag ossrs/srs:$SRS_TAG trunk + + - name: Login docker hub + uses: docker/login-action@v1 + with: + username: "${{ secrets.DOCKER_USERNAME }}" + password: "${{ secrets.DOCKER_PASSWORD }}" + - name: Push to docker hub + shell: bash + run: | + docker push ossrs/srs:$SRS_TAG + docker tag ossrs/srs:$SRS_TAG ossrs/srs:$SRS_MAJOR + docker push ossrs/srs:$SRS_MAJOR + + - name: Login Aliyun docker hub + uses: aliyun/acr-login@v1 + with: + login-server: https://registry.cn-hangzhou.aliyuncs.com + username: "${{ secrets.ACR_USERNAME }}" + password: "${{ secrets.ACR_PASSWORD }}" + - name: Push to Aliyun docker hub + shell: bash + run: | + docker tag ossrs/srs:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_TAG + docker push registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_TAG + docker tag ossrs/srs:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_MAJOR + docker push registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_MAJOR + + - name: Setup KUBCONFIG for Aliyun ACK + shell: bash + run: |- + KUBECONFIG=$RUNNER_TEMP/kubeconfig_$(date +%s) + echo "${{ secrets.KUBCONFIG }}" > $KUBECONFIG + echo "KUBECONFIG=$KUBECONFIG" >> $GITHUB_ENV + + - name: Release SRS 3.0 to Aliyun ACK + shell: bash + if: ${{ startsWith(github.ref, 'refs/tags/v3') }} + run: |- + kubectl set image deploy/srs3-deploy srs=registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_TAG + kubectl describe deploy/srs3-deploy \ No newline at end of file diff --git a/trunk/Dockerfile b/trunk/Dockerfile new file mode 100644 index 000000000..a48b22e79 --- /dev/null +++ b/trunk/Dockerfile @@ -0,0 +1,36 @@ +FROM ossrs/srs:dev AS build + +# Install depends tools. +RUN yum install -y gcc make gcc-c++ patch unzip perl git + +# Build and install SRS. +COPY . /trunk +WORKDIR /trunk +RUN ./configure --jobs=2 && make -j2 && make install + +# All config files for SRS. +RUN cp -R conf /usr/local/srs/conf +# The default index.html and srs-console. +RUN cp research/api-server/static-dir/index.html /usr/local/srs/objs/nginx/html/ +RUN cp research/api-server/static-dir/favicon.ico /usr/local/srs/objs/nginx/html/ +RUN cp research/players/crossdomain.xml /usr/local/srs/objs/nginx/html/ +RUN cp -R research/console /usr/local/srs/objs/nginx/html/ +RUN cp -R research/players /usr/local/srs/objs/nginx/html/ +#RUN cp -R 3rdparty/signaling/www/demos /usr/local/srs/objs/nginx/html/ + +############################################################ +# dist +############################################################ +FROM centos:7 AS dist + +# Expose ports for streaming @see https://github.com/ossrs/srs#ports +EXPOSE 1935 1985 8080 8000/udp 10080/udp + +# FFMPEG 4.1 +COPY --from=build /usr/local/bin/ffmpeg /usr/local/srs/objs/ffmpeg/bin/ffmpeg +# SRS binary, config files and srs-console. +COPY --from=build /usr/local/srs /usr/local/srs + +# Default workdir and command. +WORKDIR /usr/local/srs +CMD ["./objs/srs", "-c", "conf/srs.conf"] From cadefc34aed68c88559ac73b5602e8aebe9983d9 Mon Sep 17 00:00:00 2001 From: winlin Date: Sat, 14 Aug 2021 21:06:49 +0800 Subject: [PATCH 3/8] Support release SRS 4.0 --- .github/workflows/release.yml | 10 +++++++++- trunk/Dockerfile | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 00418403a..4615e4010 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,7 @@ on: push: tags: - v3* + - v4* jobs: k8s: @@ -72,4 +73,11 @@ jobs: if: ${{ startsWith(github.ref, 'refs/tags/v3') }} run: |- kubectl set image deploy/srs3-deploy srs=registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_TAG - kubectl describe deploy/srs3-deploy \ No newline at end of file + kubectl describe deploy/srs3-deploy + + - name: Release SRS 4.0 to Aliyun ACK + shell: bash + if: ${{ startsWith(github.ref, 'refs/tags/v4') }} + run: |- + kubectl set image deploy/srs4-deploy srs4=registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_TAG + kubectl describe deploy/srs4-deploy \ No newline at end of file diff --git a/trunk/Dockerfile b/trunk/Dockerfile index a48b22e79..616b3a7a2 100644 --- a/trunk/Dockerfile +++ b/trunk/Dockerfile @@ -6,7 +6,7 @@ RUN yum install -y gcc make gcc-c++ patch unzip perl git # Build and install SRS. COPY . /trunk WORKDIR /trunk -RUN ./configure --jobs=2 && make -j2 && make install +RUN ./configure --srt=on --jobs=2 && make -j2 && make install # All config files for SRS. RUN cp -R conf /usr/local/srs/conf @@ -16,7 +16,7 @@ RUN cp research/api-server/static-dir/favicon.ico /usr/local/srs/objs/nginx/html RUN cp research/players/crossdomain.xml /usr/local/srs/objs/nginx/html/ RUN cp -R research/console /usr/local/srs/objs/nginx/html/ RUN cp -R research/players /usr/local/srs/objs/nginx/html/ -#RUN cp -R 3rdparty/signaling/www/demos /usr/local/srs/objs/nginx/html/ +RUN cp -R 3rdparty/signaling/www/demos /usr/local/srs/objs/nginx/html/ ############################################################ # dist From 785d1744fc4d74ab762518a7d957c7808bdcb646 Mon Sep 17 00:00:00 2001 From: winlin Date: Sat, 14 Aug 2021 21:09:44 +0800 Subject: [PATCH 4/8] Expose live streaming ports for SRS 3.0 --- trunk/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trunk/Dockerfile b/trunk/Dockerfile index 616b3a7a2..31ed5bf42 100644 --- a/trunk/Dockerfile +++ b/trunk/Dockerfile @@ -23,8 +23,8 @@ RUN cp -R 3rdparty/signaling/www/demos /usr/local/srs/objs/nginx/html/ ############################################################ FROM centos:7 AS dist -# Expose ports for streaming @see https://github.com/ossrs/srs#ports -EXPOSE 1935 1985 8080 8000/udp 10080/udp +# Expose ports for live streaming +EXPOSE 1935 1985 8080 # FFMPEG 4.1 COPY --from=build /usr/local/bin/ffmpeg /usr/local/srs/objs/ffmpeg/bin/ffmpeg From 640436d8a66b97200ee69987c4f4036862b707aa Mon Sep 17 00:00:00 2001 From: winlin Date: Sat, 14 Aug 2021 21:10:42 +0800 Subject: [PATCH 5/8] Refine expose ports for SRS 4.0 --- trunk/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trunk/Dockerfile b/trunk/Dockerfile index 31ed5bf42..616b3a7a2 100644 --- a/trunk/Dockerfile +++ b/trunk/Dockerfile @@ -23,8 +23,8 @@ RUN cp -R 3rdparty/signaling/www/demos /usr/local/srs/objs/nginx/html/ ############################################################ FROM centos:7 AS dist -# Expose ports for live streaming -EXPOSE 1935 1985 8080 +# Expose ports for streaming @see https://github.com/ossrs/srs#ports +EXPOSE 1935 1985 8080 8000/udp 10080/udp # FFMPEG 4.1 COPY --from=build /usr/local/bin/ffmpeg /usr/local/srs/objs/ffmpeg/bin/ffmpeg From 2fdb06299c110298bde301ba4ec103f7a997df14 Mon Sep 17 00:00:00 2001 From: winlin Date: Sat, 14 Aug 2021 21:24:36 +0800 Subject: [PATCH 6/8] Support utest and regression-test when release. v4.0.156 --- .github/workflows/release.yml | 41 +++++++++++++++++++--------- README.md | 1 + trunk/Dockerfile.test | 13 +++++++++ trunk/src/core/srs_core_version4.hpp | 2 +- 4 files changed, 43 insertions(+), 14 deletions(-) create mode 100644 trunk/Dockerfile.test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4615e4010..b538f151d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,9 +12,27 @@ jobs: runs-on: ubuntu-20.04 steps: + ################################################################ + # Git checkout - name: Checkout repository uses: actions/checkout@v2 + ################################################################ + # Tests + - name: Build test image + if: ${{ !startsWith(github.ref, 'refs/tags/v3') }} + run: docker build --tag srs:test -f trunk/Dockerfile.test trunk + # For utest + - name: Run SRS utest + if: ${{ !startsWith(github.ref, 'refs/tags/v3') }} + run: docker run --rm srs:test bash -c 'make && ./objs/srs_utest' + # For regression-test + - name: Run SRS regression-test + if: ${{ !startsWith(github.ref, 'refs/tags/v3') }} + run: docker run --rm srs:test bash -c 'make && ./objs/srs -c conf/regression-test.conf && cd 3rdparty/srs-bench && make && ./objs/srs_test -test.v' + + ################################################################ + # Build # The github.ref is, for example, refs/tags/v3.0.145 or refs/tags/v3.0-r8 # Generate variables like: # SRS_TAG=v3.0.145 @@ -22,31 +40,30 @@ jobs: # SRS_MAJOR=3 # @see https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable - name: Generate varaiables - shell: bash run: | SRS_TAG=$(echo ${{ github.ref }}| awk -F '/' '{print $3}') echo "SRS_TAG=$SRS_TAG" >> $GITHUB_ENV SRS_MAJOR=$(echo $SRS_TAG| cut -c 2) echo "SRS_MAJOR=$SRS_MAJOR" >> $GITHUB_ENV - - - name: Build SRS - shell: bash + # Build SRS image + - name: Build SRS docker image run: | echo "Release ossrs/srs:$SRS_TAG" docker build --tag ossrs/srs:$SRS_TAG trunk + ################################################################ + # Docker - name: Login docker hub uses: docker/login-action@v1 with: username: "${{ secrets.DOCKER_USERNAME }}" password: "${{ secrets.DOCKER_PASSWORD }}" - name: Push to docker hub - shell: bash run: | docker push ossrs/srs:$SRS_TAG docker tag ossrs/srs:$SRS_TAG ossrs/srs:$SRS_MAJOR docker push ossrs/srs:$SRS_MAJOR - + # Aliyun ACR - name: Login Aliyun docker hub uses: aliyun/acr-login@v1 with: @@ -54,30 +71,28 @@ jobs: username: "${{ secrets.ACR_USERNAME }}" password: "${{ secrets.ACR_PASSWORD }}" - name: Push to Aliyun docker hub - shell: bash run: | docker tag ossrs/srs:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_TAG docker push registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_TAG docker tag ossrs/srs:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_MAJOR docker push registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_MAJOR + ################################################################ + # K8S - name: Setup KUBCONFIG for Aliyun ACK - shell: bash run: |- KUBECONFIG=$RUNNER_TEMP/kubeconfig_$(date +%s) echo "${{ secrets.KUBCONFIG }}" > $KUBECONFIG echo "KUBECONFIG=$KUBECONFIG" >> $GITHUB_ENV - + # K8S for SRS 3.0 - name: Release SRS 3.0 to Aliyun ACK - shell: bash if: ${{ startsWith(github.ref, 'refs/tags/v3') }} run: |- kubectl set image deploy/srs3-deploy srs=registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_TAG kubectl describe deploy/srs3-deploy - + # K8S for SRS 4.0 - name: Release SRS 4.0 to Aliyun ACK - shell: bash if: ${{ startsWith(github.ref, 'refs/tags/v4') }} run: |- kubectl set image deploy/srs4-deploy srs4=registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_TAG - kubectl describe deploy/srs4-deploy \ No newline at end of file + kubectl describe deploy/srs4-deploy diff --git a/README.md b/README.md index 38d9e2d81..d436e08dd 100755 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ ![](http://ossrs.net/gif/v1/sls.gif?site=github.com&path=/srs/4.0release) [![](https://github.com/ossrs/srs/actions/workflows/codeql-analysis.yml/badge.svg?branch=4.0release)](https://github.com/ossrs/srs/actions?query=workflow%3ACodeQL+branch%3A4.0release) +[![](https://github.com/ossrs/srs/actions/workflows/release.yml/badge.svg)](https://github.com/ossrs/srs/actions/workflows/release.yml?query=workflow%3ARelease) [![](https://circleci.com/gh/ossrs/srs/tree/4.0release.svg?style=svg&circle-token=1ef1d5b5b0cde6c8c282ed856a18199f9e8f85a9)](https://circleci.com/gh/ossrs/srs/tree/4.0release) [![](https://codecov.io/gh/ossrs/srs/branch/4.0release/graph/badge.svg)](https://codecov.io/gh/ossrs/srs/branch/4.0release) [![](https://gitee.com/winlinvip/srs-wiki/raw/master/images/wechat-badge.png)](../../wikis/Contact#wechat) diff --git a/trunk/Dockerfile.test b/trunk/Dockerfile.test new file mode 100644 index 000000000..1bf98f85c --- /dev/null +++ b/trunk/Dockerfile.test @@ -0,0 +1,13 @@ +FROM ossrs/srs:dev + +# Install depends tools. +RUN yum install -y gcc make gcc-c++ patch unzip perl git + +# Build and install SRS. +COPY . /trunk +WORKDIR /trunk +RUN ./configure --srt=on --utest=on --jobs=2 && make -j2 +RUN cd 3rdparty/srs-bench && make + +# Run utest +RUN ./objs/srs_utest diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index 1763b5373..78ff735fe 100644 --- a/trunk/src/core/srs_core_version4.hpp +++ b/trunk/src/core/srs_core_version4.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 4 #define VERSION_MINOR 0 -#define VERSION_REVISION 155 +#define VERSION_REVISION 156 #endif From 121fed57d38a8bbc6cb0e55ae740d58f77aaa483 Mon Sep 17 00:00:00 2001 From: winlin Date: Sun, 15 Aug 2021 07:44:25 +0800 Subject: [PATCH 7/8] Actions: Remove v3 in 4.0, never trigger it --- .github/workflows/release.yml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b538f151d..b7535ccc7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,6 @@ name: "Release" on: push: tags: - - v3* - v4* jobs: @@ -20,24 +19,21 @@ jobs: ################################################################ # Tests - name: Build test image - if: ${{ !startsWith(github.ref, 'refs/tags/v3') }} run: docker build --tag srs:test -f trunk/Dockerfile.test trunk # For utest - name: Run SRS utest - if: ${{ !startsWith(github.ref, 'refs/tags/v3') }} run: docker run --rm srs:test bash -c 'make && ./objs/srs_utest' # For regression-test - name: Run SRS regression-test - if: ${{ !startsWith(github.ref, 'refs/tags/v3') }} run: docker run --rm srs:test bash -c 'make && ./objs/srs -c conf/regression-test.conf && cd 3rdparty/srs-bench && make && ./objs/srs_test -test.v' ################################################################ # Build - # The github.ref is, for example, refs/tags/v3.0.145 or refs/tags/v3.0-r8 + # The github.ref is, for example, refs/tags/v4.0.145 or refs/tags/v4.0-r8 # Generate variables like: - # SRS_TAG=v3.0.145 - # SRS_TAG=v3.0-r8 - # SRS_MAJOR=3 + # SRS_TAG=v4.0.145 + # SRS_TAG=v4.0-r8 + # SRS_MAJOR=4 # @see https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable - name: Generate varaiables run: | @@ -84,12 +80,6 @@ jobs: KUBECONFIG=$RUNNER_TEMP/kubeconfig_$(date +%s) echo "${{ secrets.KUBCONFIG }}" > $KUBECONFIG echo "KUBECONFIG=$KUBECONFIG" >> $GITHUB_ENV - # K8S for SRS 3.0 - - name: Release SRS 3.0 to Aliyun ACK - if: ${{ startsWith(github.ref, 'refs/tags/v3') }} - run: |- - kubectl set image deploy/srs3-deploy srs=registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_TAG - kubectl describe deploy/srs3-deploy # K8S for SRS 4.0 - name: Release SRS 4.0 to Aliyun ACK if: ${{ startsWith(github.ref, 'refs/tags/v4') }} From a2df2a240233b658bbf2f740915ba7778f408320 Mon Sep 17 00:00:00 2001 From: winlin Date: Sun, 15 Aug 2021 11:21:36 +0800 Subject: [PATCH 8/8] Refine Dockerfile --- trunk/Dockerfile | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/trunk/Dockerfile b/trunk/Dockerfile index 616b3a7a2..393dca737 100644 --- a/trunk/Dockerfile +++ b/trunk/Dockerfile @@ -9,14 +9,13 @@ WORKDIR /trunk RUN ./configure --srt=on --jobs=2 && make -j2 && make install # All config files for SRS. -RUN cp -R conf /usr/local/srs/conf -# The default index.html and srs-console. -RUN cp research/api-server/static-dir/index.html /usr/local/srs/objs/nginx/html/ -RUN cp research/api-server/static-dir/favicon.ico /usr/local/srs/objs/nginx/html/ -RUN cp research/players/crossdomain.xml /usr/local/srs/objs/nginx/html/ -RUN cp -R research/console /usr/local/srs/objs/nginx/html/ -RUN cp -R research/players /usr/local/srs/objs/nginx/html/ -RUN cp -R 3rdparty/signaling/www/demos /usr/local/srs/objs/nginx/html/ +RUN cp -R conf /usr/local/srs/conf && \ + cp research/api-server/static-dir/index.html /usr/local/srs/objs/nginx/html/ && \ + cp research/api-server/static-dir/favicon.ico /usr/local/srs/objs/nginx/html/ && \ + cp research/players/crossdomain.xml /usr/local/srs/objs/nginx/html/ && \ + cp -R research/console /usr/local/srs/objs/nginx/html/ && \ + cp -R research/players /usr/local/srs/objs/nginx/html/ && \ + cp -R 3rdparty/signaling/www/demos /usr/local/srs/objs/nginx/html/ ############################################################ # dist