Skip to content

Nginx Image for HLS CDN #4

Nginx Image for HLS CDN

Nginx Image for HLS CDN #4

Workflow file for this run

name: "Nginx Image for HLS CDN"
on:
workflow_dispatch:
jobs:
envs:
name: envs
steps:
- name: Generate varaiables
run: |
SRS_MAJOR=nginx-hls-cdn
SRS_TAG=nginx-hls-cdn-v1.0.0
echo "SRS_MAJOR=$SRS_MAJOR" >> $GITHUB_ENV
echo "SRS_TAG=$SRS_TAG" >> $GITHUB_ENV
outputs:
SRS_TAG: ${{ env.SRS_TAG }}
SRS_MAJOR: ${{ env.SRS_MAJOR }}
runs-on: ubuntu-20.04
docker:
needs:
- envs
steps:
- name: Covert output to env
run: |
echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV
echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to docker hub
uses: docker/login-action@v2
with:
username: "${{ secrets.DOCKER_USERNAME }}"
password: "${{ secrets.DOCKER_PASSWORD }}"
- name: Build SRS docker image
run: |
echo "Release ossrs/srs-stack:$SRS_TAG"
docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64/v8 \
--output "type=image,push=true" \
--tag ossrs/srs-stack:$SRS_TAG scripts/nginx-hls-cdn
- name: Docker alias images for ossrs/srs-stack
uses: akhilerm/[email protected]
with:
src: ossrs/srs-stack:${{ env.SRS_TAG }}
dst: |
ossrs/srs-cloud:${{ env.SRS_TAG }}
ossrs/srs-cloud:${{ env.SRS_MAJOR }}
ossrs/srs-stack:${{ env.SRS_MAJOR }}
runs-on: ubuntu-20.04
aliyun:
needs:
- envs
- docker
steps:
- name: Covert output to env
run: |
echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV
echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV
- name: Login Aliyun docker hub
uses: docker/login-action@v2
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: "${{ secrets.ACR_USERNAME }}"
password: "${{ secrets.ACR_PASSWORD }}"
- name: Docker alias images for ossrs/srs-stack
uses: akhilerm/[email protected]
with:
src: ossrs/srs-stack:${{ env.SRS_TAG }}
dst: |
registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:${{ env.SRS_TAG }}
registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:${{ env.SRS_MAJOR }}
registry.cn-hangzhou.aliyuncs.com/ossrs/srs-cloud:${{ env.SRS_TAG }}
registry.cn-hangzhou.aliyuncs.com/ossrs/srs-cloud:${{ env.SRS_MAJOR }}
runs-on: ubuntu-20.04