|
|
@ -134,186 +134,12 @@ jobs:
|
|
|
|
registry.cn-hangzhou.aliyuncs.com/ossrs/srs:v${{ env.SRS_MAJOR }}
|
|
|
|
registry.cn-hangzhou.aliyuncs.com/ossrs/srs:v${{ env.SRS_MAJOR }}
|
|
|
|
registry.cn-hangzhou.aliyuncs.com/ossrs/srs:latest
|
|
|
|
registry.cn-hangzhou.aliyuncs.com/ossrs/srs:latest
|
|
|
|
|
|
|
|
|
|
|
|
docker-droplet:
|
|
|
|
|
|
|
|
name: docker-droplet
|
|
|
|
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
|
|
|
|
needs:
|
|
|
|
|
|
|
|
- test
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
##################################################################################################################
|
|
|
|
|
|
|
|
##################################################################################################################
|
|
|
|
|
|
|
|
##################################################################################################################
|
|
|
|
|
|
|
|
# Git checkout
|
|
|
|
|
|
|
|
- name: Checkout repository
|
|
|
|
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# See https://github.com/crazy-max/ghaction-docker-buildx#moved-to-docker-organization
|
|
|
|
|
|
|
|
# https://github.com/docker/setup-qemu-action
|
|
|
|
|
|
|
|
- name: Set up QEMU
|
|
|
|
|
|
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
|
|
|
|
# https://github.com/docker/setup-buildx-action
|
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# The github.ref is, for example, refs/tags/v4.0.145 or refs/tags/v4.0-r8
|
|
|
|
|
|
|
|
# Generate variables like:
|
|
|
|
|
|
|
|
# SRS_TAG=v4.0-r8
|
|
|
|
|
|
|
|
# SRS_TAG=v4.0.145
|
|
|
|
|
|
|
|
# SRS_VERSION=4.0.145
|
|
|
|
|
|
|
|
# SRS_VERSION=4.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: |
|
|
|
|
|
|
|
|
SRS_TAG=$(echo ${{ github.ref }}| awk -F '/' '{print $3}')
|
|
|
|
|
|
|
|
echo "SRS_TAG=$SRS_TAG" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
SRS_VERSION=$(echo ${SRS_TAG}| sed 's/^v//g')
|
|
|
|
|
|
|
|
echo "SRS_VERSION=$SRS_VERSION" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
SRS_MAJOR=$(echo $SRS_TAG| cut -c 2)
|
|
|
|
|
|
|
|
echo "SRS_MAJOR=$SRS_MAJOR" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
##################################################################################################################
|
|
|
|
|
|
|
|
##################################################################################################################
|
|
|
|
|
|
|
|
##################################################################################################################
|
|
|
|
|
|
|
|
# Create main images for Docker
|
|
|
|
|
|
|
|
- name: Login to docker hub
|
|
|
|
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
username: "${{ secrets.DOCKER_USERNAME }}"
|
|
|
|
|
|
|
|
password: "${{ secrets.DOCKER_PASSWORD }}"
|
|
|
|
|
|
|
|
- name: Build and push images to Docker hub
|
|
|
|
|
|
|
|
env:
|
|
|
|
|
|
|
|
PACKAGER_DROPLET: ${{ secrets.SRS_PACKAGER_DROPLET }}
|
|
|
|
|
|
|
|
run: |
|
|
|
|
|
|
|
|
echo "Release ossrs/droplet:$SRS_TAG"
|
|
|
|
|
|
|
|
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 \
|
|
|
|
|
|
|
|
--output "type=image,push=true" \
|
|
|
|
|
|
|
|
-t ossrs/droplet:$SRS_TAG --build-arg SRS_AUTO_PACKAGER=$PACKAGER_DROPLET -f trunk/Dockerfile .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Docker alias images
|
|
|
|
|
|
|
|
- name: Docker alias images for ossrs/droplet
|
|
|
|
|
|
|
|
uses: akhilerm/tag-push-action@v2.0.0
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
src: ossrs/droplet:${{ env.SRS_TAG }}
|
|
|
|
|
|
|
|
dst: |
|
|
|
|
|
|
|
|
ossrs/droplet:${{ env.SRS_VERSION }}
|
|
|
|
|
|
|
|
ossrs/droplet:${{ env.SRS_MAJOR }}
|
|
|
|
|
|
|
|
ossrs/droplet:v${{ env.SRS_MAJOR }}
|
|
|
|
|
|
|
|
ossrs/droplet:latest
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Aliyun ACR
|
|
|
|
|
|
|
|
- name: Login aliyun hub
|
|
|
|
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
registry: registry.cn-hangzhou.aliyuncs.com
|
|
|
|
|
|
|
|
username: "${{ secrets.ACR_USERNAME }}"
|
|
|
|
|
|
|
|
password: "${{ secrets.ACR_PASSWORD }}"
|
|
|
|
|
|
|
|
- name: Push to Aliyun registry for ossrs/droplet
|
|
|
|
|
|
|
|
uses: akhilerm/tag-push-action@v2.0.0
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
src: ossrs/droplet:${{ env.SRS_TAG }}
|
|
|
|
|
|
|
|
dst: |
|
|
|
|
|
|
|
|
registry.cn-hangzhou.aliyuncs.com/ossrs/droplet:${{ env.SRS_TAG }}
|
|
|
|
|
|
|
|
registry.cn-hangzhou.aliyuncs.com/ossrs/droplet:${{ env.SRS_VERSION }}
|
|
|
|
|
|
|
|
registry.cn-hangzhou.aliyuncs.com/ossrs/droplet:${{ env.SRS_MAJOR }}
|
|
|
|
|
|
|
|
registry.cn-hangzhou.aliyuncs.com/ossrs/droplet:v${{ env.SRS_MAJOR }}
|
|
|
|
|
|
|
|
registry.cn-hangzhou.aliyuncs.com/ossrs/droplet:latest
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docker-lighthouse:
|
|
|
|
|
|
|
|
name: docker-lighthouse
|
|
|
|
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
|
|
|
|
needs:
|
|
|
|
|
|
|
|
- test
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
##################################################################################################################
|
|
|
|
|
|
|
|
##################################################################################################################
|
|
|
|
|
|
|
|
##################################################################################################################
|
|
|
|
|
|
|
|
# Git checkout
|
|
|
|
|
|
|
|
- name: Checkout repository
|
|
|
|
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# See https://github.com/crazy-max/ghaction-docker-buildx#moved-to-docker-organization
|
|
|
|
|
|
|
|
# https://github.com/docker/setup-qemu-action
|
|
|
|
|
|
|
|
- name: Set up QEMU
|
|
|
|
|
|
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
|
|
|
|
# https://github.com/docker/setup-buildx-action
|
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# The github.ref is, for example, refs/tags/v4.0.145 or refs/tags/v4.0-r8
|
|
|
|
|
|
|
|
# Generate variables like:
|
|
|
|
|
|
|
|
# SRS_TAG=v4.0-r8
|
|
|
|
|
|
|
|
# SRS_TAG=v4.0.145
|
|
|
|
|
|
|
|
# SRS_VERSION=4.0.145
|
|
|
|
|
|
|
|
# SRS_VERSION=4.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: |
|
|
|
|
|
|
|
|
SRS_TAG=$(echo ${{ github.ref }}| awk -F '/' '{print $3}')
|
|
|
|
|
|
|
|
echo "SRS_TAG=$SRS_TAG" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
SRS_VERSION=$(echo ${SRS_TAG}| sed 's/^v//g')
|
|
|
|
|
|
|
|
echo "SRS_VERSION=$SRS_VERSION" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
SRS_MAJOR=$(echo $SRS_TAG| cut -c 2)
|
|
|
|
|
|
|
|
echo "SRS_MAJOR=$SRS_MAJOR" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
##################################################################################################################
|
|
|
|
|
|
|
|
##################################################################################################################
|
|
|
|
|
|
|
|
##################################################################################################################
|
|
|
|
|
|
|
|
# Create main images for Docker
|
|
|
|
|
|
|
|
- name: Login to docker hub
|
|
|
|
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
username: "${{ secrets.DOCKER_USERNAME }}"
|
|
|
|
|
|
|
|
password: "${{ secrets.DOCKER_PASSWORD }}"
|
|
|
|
|
|
|
|
- name: Build and push images to Docker hub
|
|
|
|
|
|
|
|
env:
|
|
|
|
|
|
|
|
PACKAGER_LIGHTHOUSE: ${{ secrets.SRS_PACKAGER_LIGHTHOUSE }}
|
|
|
|
|
|
|
|
run: |
|
|
|
|
|
|
|
|
echo "Release ossrs/lighthouse:$SRS_TAG"
|
|
|
|
|
|
|
|
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 \
|
|
|
|
|
|
|
|
--output "type=image,push=true" \
|
|
|
|
|
|
|
|
-t ossrs/lighthouse:$SRS_TAG --build-arg SRS_AUTO_PACKAGER=$PACKAGER_LIGHTHOUSE -f trunk/Dockerfile .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Docker alias images
|
|
|
|
|
|
|
|
- name: Docker alias images for ossrs/lighthouse
|
|
|
|
|
|
|
|
uses: akhilerm/tag-push-action@v2.0.0
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
src: ossrs/lighthouse:${{ env.SRS_TAG }}
|
|
|
|
|
|
|
|
dst: |
|
|
|
|
|
|
|
|
ossrs/lighthouse:${{ env.SRS_VERSION }}
|
|
|
|
|
|
|
|
ossrs/lighthouse:${{ env.SRS_MAJOR }}
|
|
|
|
|
|
|
|
ossrs/lighthouse:v${{ env.SRS_MAJOR }}
|
|
|
|
|
|
|
|
ossrs/lighthouse:latest
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Aliyun ACR
|
|
|
|
|
|
|
|
- name: Login aliyun hub
|
|
|
|
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
registry: registry.cn-hangzhou.aliyuncs.com
|
|
|
|
|
|
|
|
username: "${{ secrets.ACR_USERNAME }}"
|
|
|
|
|
|
|
|
password: "${{ secrets.ACR_PASSWORD }}"
|
|
|
|
|
|
|
|
- name: Push to Aliyun registry for ossrs/lighthouse
|
|
|
|
|
|
|
|
uses: akhilerm/tag-push-action@v2.0.0
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
src: ossrs/lighthouse:${{ env.SRS_TAG }}
|
|
|
|
|
|
|
|
dst: |
|
|
|
|
|
|
|
|
registry.cn-hangzhou.aliyuncs.com/ossrs/lighthouse:${{ env.SRS_TAG }}
|
|
|
|
|
|
|
|
registry.cn-hangzhou.aliyuncs.com/ossrs/lighthouse:${{ env.SRS_VERSION }}
|
|
|
|
|
|
|
|
registry.cn-hangzhou.aliyuncs.com/ossrs/lighthouse:${{ env.SRS_MAJOR }}
|
|
|
|
|
|
|
|
registry.cn-hangzhou.aliyuncs.com/ossrs/lighthouse:v${{ env.SRS_MAJOR }}
|
|
|
|
|
|
|
|
registry.cn-hangzhou.aliyuncs.com/ossrs/lighthouse:latest
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
update:
|
|
|
|
update:
|
|
|
|
name: update
|
|
|
|
name: update
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
needs:
|
|
|
|
needs:
|
|
|
|
- test
|
|
|
|
- test
|
|
|
|
- docker-srs
|
|
|
|
- docker-srs
|
|
|
|
- docker-lighthouse
|
|
|
|
|
|
|
|
- docker-droplet
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
##################################################################################################################
|
|
|
|
##################################################################################################################
|
|
|
|