Skip to content

Commit

Permalink
Release versions v1.0.375
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Nov 11, 2023
1 parent b8c5643 commit 544e48a
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/api-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,19 +129,22 @@ jobs:
timeout: 60s
command_timeout: 30m
script: |
#
ufw allow 8101
#
export SRS_DROPLET_PIP=$(ifconfig eth0 |grep 'inet ' |awk '{print $2}')
echo "SRS_DROPLET_PIP=$SRS_DROPLET_PIP"
#
# Restart srs-stack releases
for ((i=0; i < 5; i++)); do
if [[ $(docker ps -f name=docs-cloudversion |wc -l) -eq 1 ]]; then echo "Killed"; break; fi;
docker rm -f docs-cloudversion; sleep 0.3;
done
# Remove the old versions.
OLD_IMAGE=$(docker images |grep releases |awk '{print $1":"$2}' 1>/dev/null 2>/dev/null)
if [[ ! -z $OLD_IMAGE ]]; then docker rmi $OLD_IMAGE; echo "Remove old image $OLD_IMAGE"; fi
docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:$SRS_MAJOR
docker rm -f docs-cloudversion || sleep 1
# Start new releases.
docker run -d -it --restart always --name docs-cloudversion -p 8101:9000 \
registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:$SRS_TAG
registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:$SRS_MAJOR
#
# 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
runs-on: ubuntu-20.04

0 comments on commit 544e48a

Please sign in to comment.