diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8e5f5c8355..48771774b4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -116,6 +116,38 @@ jobs: ossrs/srs:v${{ env.SRS_MAJOR }} ossrs/srs:latest + aliyun-srs: + name: aliyun-srs + runs-on: ubuntu-20.04 + needs: + - test + - docker-srs + + steps: + ################################################################################################################## + ################################################################################################################## + ################################################################################################################## + # Git checkout + - name: Checkout repository + uses: actions/checkout@v2 + + # 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 + # Aliyun ACR - name: Login aliyun hub uses: docker/login-action@v1 @@ -139,7 +171,7 @@ jobs: runs-on: ubuntu-20.04 needs: - test - - docker-srs + - aliyun-srs steps: ##################################################################################################################