Skip to content

Build docker but not push to registry #386

Build docker but not push to registry

Build docker but not push to registry #386

Workflow file for this run

name: Docker Build
on:
push:
branches: [ "main", "dev", "maint-*" ]
pull_request:
branches: [ "main", "dev", "maint-*" ]
permissions:
contents: read
jobs:
docker:
runs-on: ubuntu-latest
timeout-minutes: 120
permissions:
contents: read
packages: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3.4.0
with:
buildkitd-flags: --debug --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host
cache-binary: true
driver-opts: |
image=moby/buildkit:master
network=host
install: true
platforms: linux/amd64
- name: Login to GitHub Container Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push SDK sample apps
uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0
with:
file: sdk/Dockerfile
tags: "ghcr.io/openvisualcloud/media-communications-mesh/sdk:${{ github.sha }}"
context: .
push: false
cache-from: type=registry,ref=ghcr.io/openvisualcloud/media-communications-mesh/sdk:buildcache
cache-to: type=registry,ref=ghcr.io/openvisualcloud/media-communications-mesh/sdk:buildcache,mode=max
- name: Build and push ffmpeg and plugins
uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0
with:
file: ffmpeg-plugin/Dockerfile
tags: "ghcr.io/openvisualcloud/media-communications-mesh/ffmpeg:${{ github.sha }}"
context: .
push: false
cache-from: type=registry,ref=ghcr.io/openvisualcloud/media-communications-mesh/ffmpeg:buildcache
cache-to: type=registry,ref=ghcr.io/openvisualcloud/media-communications-mesh/ffmpeg:buildcache,mode=max
- name: Build and push media proxy application
uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0
with:
file: media-proxy/Dockerfile
tags: "ghcr.io/openvisualcloud/media-communications-mesh/media-proxy:${{ github.sha }}"
context: .
push: false
cache-from: type=registry,ref=ghcr.io/openvisualcloud/media-communications-mesh/media-proxy:buildcache
cache-to: type=registry,ref=ghcr.io/openvisualcloud/media-communications-mesh/media-proxy:buildcache,mode=max