Skip to content

chore: Revamp build system to overcome Cross issues #942

chore: Revamp build system to overcome Cross issues

chore: Revamp build system to overcome Cross issues #942

name: Build ONVIF Broker (.NET)
on:
push:
branches: [ main ]
paths:
- .github/workflows/build-onvif-video-broker-container.yml
- build/containers/Dockerfile.onvif-video-broker
- samples/brokers/onvif-video-broker/**
- version.txt
- build/samples.mk
- Makefile
pull_request:
branches: [ main ]
paths:
- .github/workflows/build-onvif-video-broker-container.yml
- build/containers/Dockerfile.onvif-video-broker
- samples/brokers/onvif-video-broker/**
- version.txt
- build/samples.mk
- Makefile
release:
types:
- published
env:
AKRI_COMPONENT: onvif-video-broker
MAKEFILE_COMPONENT: onvif
jobs:
build-broker:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout the head commit of the branch
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Get version.txt
id: version-string
run: |
echo "version=$(cat version.txt)" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
run: |
make onvif-video-broker $(${{ github.event_name != 'pull_request' }} && echo "PUSH=1")