Merge pull request #701 from CeerDecy/upgrade-yaml #980
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
if: github.event_name == 'push' || github.event_name == 'release' | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ secrets.crUsername }} | |
password: ${{ secrets.crPassword }} | |
- name: Build and push | |
run: | | |
make onvif-video-broker PREFIX=ghcr.io/project-akri/akri $(${{ github.event_name != 'pull_request' }} && echo "PUSH=1") | |