Update release workflow and remove unnecessary scripts

1. Updated the release workflow for GitHub action.
2. Removed the script that updates the lh.ossrs.net and d.ossrs.net.
3. Only kept a demo script for updating r.ossrs.net.

Please note that this code has not been tested yet, but it is expected to work. The changes will be triggered in the next release.
pull/3607/head
winlin 2 years ago
parent 6e77653cdc
commit 9ffbefac1c

@ -326,17 +326,15 @@ jobs:
uses: actions/checkout@v3
##################################################################################################################
# Generate variables like:
# SRS_LH_OSSRS_NET=1.2.3.4
- name: Build variables for lh.ossrs.net
# SRS_R_OSSRS_NET=1.2.3.4
- name: Build variables for r.ossrs.net
run: |
SRS_LH_OSSRS_NET=$(dig +short lh.ossrs.net)
SRS_D_OSSRS_NET=$(dig +short d.ossrs.net)
echo "SRS_LH_OSSRS_NET=$SRS_LH_OSSRS_NET" >> $GITHUB_ENV
echo "SRS_D_OSSRS_NET=$SRS_D_OSSRS_NET" >> $GITHUB_ENV
- name: Release to lh.ossrs.net
SRS_R_OSSRS_NET=$(dig +short r.ossrs.net)
echo "SRS_R_OSSRS_NET=$SRS_R_OSSRS_NET" >> $GITHUB_ENV
- name: Release to r.ossrs.net
uses: appleboy/ssh-action@master
with:
host: ${{ env.SRS_LH_OSSRS_NET }}
host: ${{ env.SRS_R_OSSRS_NET }}
username: root
key: ${{ secrets.DIGITALOCEAN_SSHKEY }}
port: 22
@ -344,33 +342,7 @@ jobs:
timeout: 60s
command_timeout: 30m
script: |
docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_MAJOR
docker rm -f srs-dev
#
# Cleanup old docker images.
for image in $(docker images |grep '<none>' |awk '{print $3}'); do
docker rmi -f $image
echo "Remove image $image, r0=$?"
done
- name: Release to d.ossrs.net
uses: appleboy/ssh-action@master
with:
host: ${{ env.SRS_D_OSSRS_NET }}
username: root
key: ${{ secrets.DIGITALOCEAN_SSHKEY }}
port: 22
envs: SRS_MAJOR
timeout: 60s
command_timeout: 30m
script: |
docker pull ossrs/srs:$SRS_MAJOR
docker rm -f srs-dev
#
# Cleanup old docker images.
for image in $(docker images |grep '<none>' |awk '{print $3}'); do
docker rmi -f $image
echo "Remove image $image, r0=$?"
done
echo "Update r.ossrs.net ok for SRS $SRS_MAJOR"
runs-on: ubuntu-20.04
release:

Loading…
Cancel
Save