|
| 1 | +name: docker-publish |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ "main", "maint-*" ] |
| 6 | + paths-ignore: |
| 7 | + - 'docs/**' |
| 8 | + - '*.md' |
| 9 | +permissions: |
| 10 | + contents: read |
| 11 | + |
| 12 | +env: |
| 13 | + BUILD_TYPE: "Release" |
| 14 | + DOCKER_IMAGE_BASE: "ghcr.io/openvisualcloud/media-communications-mesh" |
| 15 | + DOCKER_IMAGE_TAG: "${{ github.sha }}" |
| 16 | + |
| 17 | +jobs: |
| 18 | + docker-publish-sdk: |
| 19 | + name: "Publish Intel® Media Communications Mesh SDK" |
| 20 | + runs-on: ubuntu-22.04 |
| 21 | + if: github.repository == 'openvisualcloud/media-communications-mesh' |
| 22 | + permissions: |
| 23 | + packages: write |
| 24 | + timeout-minutes: 120 |
| 25 | + steps: |
| 26 | + - name: Harden Runner |
| 27 | + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 |
| 28 | + with: |
| 29 | + egress-policy: audit |
| 30 | + |
| 31 | + - name: Checkout |
| 32 | + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 |
| 33 | + |
| 34 | + - name: Set up Docker Buildx |
| 35 | + uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3.4.0 |
| 36 | + with: |
| 37 | + buildkitd-flags: --debug |
| 38 | + |
| 39 | + - name: Login to GitHub Container Registry |
| 40 | + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 |
| 41 | + with: |
| 42 | + registry: ghcr.io |
| 43 | + username: ${{ secrets.ACTION_DOCKER_REGISTRY_LOGIN_USER }} |
| 44 | + password: ${{ secrets.ACTION_DOCKER_REGISTRY_LOGIN_KEY }} |
| 45 | + |
| 46 | + - name: Build and publish SDK sample apps |
| 47 | + uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0 |
| 48 | + with: |
| 49 | + file: sdk/Dockerfile |
| 50 | + tags: "${{ env.DOCKER_IMAGE_BASE }}/sdk:${{ env.DOCKER_IMAGE_TAG }}" |
| 51 | + context: . |
| 52 | + push: true |
| 53 | + cache-from: type=registry,ref=${{ env.DOCKER_IMAGE_BASE }}/sdk:buildcache |
| 54 | + cache-to: type=registry,ref=${{ env.DOCKER_IMAGE_BASE }}/sdk:buildcache,mode=max |
| 55 | + |
| 56 | + docker-publish-ffmpeg: |
| 57 | + name: "Publish Intel® Media Communications Mesh FFmpeg" |
| 58 | + runs-on: ubuntu-22.04 |
| 59 | + if: github.repository == 'openvisualcloud/media-communications-mesh' |
| 60 | + permissions: |
| 61 | + packages: write |
| 62 | + timeout-minutes: 120 |
| 63 | + steps: |
| 64 | + - name: Harden Runner |
| 65 | + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 |
| 66 | + with: |
| 67 | + egress-policy: audit |
| 68 | + |
| 69 | + - name: Checkout |
| 70 | + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 |
| 71 | + |
| 72 | + - name: Set up Docker Buildx |
| 73 | + uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3.4.0 |
| 74 | + with: |
| 75 | + buildkitd-flags: --debug |
| 76 | + |
| 77 | + - name: Login to GitHub Container Registry |
| 78 | + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 |
| 79 | + with: |
| 80 | + registry: ghcr.io |
| 81 | + username: ${{ secrets.ACTION_DOCKER_REGISTRY_LOGIN_USER }} |
| 82 | + password: ${{ secrets.ACTION_DOCKER_REGISTRY_LOGIN_KEY }} |
| 83 | + |
| 84 | + - name: Build and publish ffmpeg and plugins |
| 85 | + uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0 |
| 86 | + with: |
| 87 | + file: ffmpeg-plugin/Dockerfile |
| 88 | + tags: "${{ env.DOCKER_IMAGE_BASE }}/ffmpeg:${{ env.DOCKER_IMAGE_TAG }}" |
| 89 | + context: . |
| 90 | + push: true |
| 91 | + cache-from: type=registry,ref=${{ env.DOCKER_IMAGE_BASE }}/ffmpeg:buildcache |
| 92 | + cache-to: type=registry,ref=${{ env.DOCKER_IMAGE_BASE }}/ffmpeg:buildcache,mode=max |
| 93 | + |
| 94 | + docker-publish-media-proxy: |
| 95 | + name: "Publish Intel® Media Communications Mesh media-proxy" |
| 96 | + runs-on: ubuntu-22.04 |
| 97 | + if: github.repository == 'openvisualcloud/media-communications-mesh' |
| 98 | + permissions: |
| 99 | + packages: write |
| 100 | + timeout-minutes: 120 |
| 101 | + steps: |
| 102 | + - name: Harden Runner |
| 103 | + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 |
| 104 | + with: |
| 105 | + egress-policy: audit |
| 106 | + |
| 107 | + - name: Checkout |
| 108 | + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 |
| 109 | + |
| 110 | + - name: Set up Docker Buildx |
| 111 | + uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3.4.0 |
| 112 | + with: |
| 113 | + buildkitd-flags: --debug |
| 114 | + |
| 115 | + - name: Login to GitHub Container Registry |
| 116 | + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 |
| 117 | + with: |
| 118 | + registry: ghcr.io |
| 119 | + username: ${{ secrets.ACTION_DOCKER_REGISTRY_LOGIN_USER }} |
| 120 | + password: ${{ secrets.ACTION_DOCKER_REGISTRY_LOGIN_KEY }} |
| 121 | + |
| 122 | + - name: Build and publish media proxy application |
| 123 | + uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0 |
| 124 | + with: |
| 125 | + file: media-proxy/Dockerfile |
| 126 | + tags: "${{ env.DOCKER_IMAGE_BASE }}/media-proxy:${{ env.DOCKER_IMAGE_TAG }}" |
| 127 | + context: . |
| 128 | + push: true |
| 129 | + cache-from: type=registry,ref=${{ env.DOCKER_IMAGE_BASE }}/media-proxy:buildcache |
| 130 | + cache-to: type=registry,ref=${{ env.DOCKER_IMAGE_BASE }}/media-proxy:buildcache,mode=max |
0 commit comments