loop webp LPR video files, LPR has been added to the general README e… #124
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 and publish latest docker images | |
on: | |
push: | |
branches: | |
- develop | |
# to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
env: | |
REGISTRY: ghcr.io | |
jobs: | |
get-version: | |
runs-on: ubuntu-latest | |
outputs: | |
savant_version: ${{ steps.get-savant-version.outputs.savant_version }} | |
deepstream_version: ${{ steps.get-deepstream-version.outputs.deepstream_version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- id: get-savant-version | |
run: echo "savant_version=$(cat savant/VERSION | awk -F= '$1=="SAVANT"{print $2}' | sed 's/"//g')" >> $GITHUB_OUTPUT | |
- id: get-deepstream-version | |
run: echo "deepstream_version=$(cat savant/VERSION | awk -F= '$1=="DEEPSTREAM"{print $2}' | sed 's/"//g')" >> $GITHUB_OUTPUT | |
- run: | | |
echo Savant version: ${{ steps.get-savant-version.outputs.savant_version }} | |
echo DeepStream version: ${{ steps.get-deepstream-version.outputs.deepstream_version }} | |
# build deepstream dockers | |
build-deepstream: | |
needs: get-version | |
runs-on: self-hosted | |
permissions: | |
contents: read | |
packages: write | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- docker_file: docker/Dockerfile.deepstream | |
docker_suffix: deepstream | |
arch: linux/amd64 | |
- docker_file: docker/Dockerfile.deepstream | |
docker_suffix: deepstream-l4t | |
arch: linux/arm64 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Log in to the container registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up docker buildx | |
uses: docker/setup-buildx-action@v2 | |
# base image | |
- name: Build and push savant-deepstream docker image | |
uses: docker/build-push-action@v4 | |
with: | |
file: ${{ matrix.docker_file }} | |
tags: | | |
${{ env.REGISTRY }}/${{ github.repository_owner }}/savant-${{ matrix.docker_suffix }}:latest | |
build-args: | | |
SAVANT_VERSION=${{ needs.get-version.outputs.savant_version }} | |
DEEPSTREAM_VERSION=${{ needs.get-version.outputs.deepstream_version }} | |
platforms: ${{ matrix.arch }} | |
target: base | |
push: true | |
# adapter image | |
- name: Build and push savant-adapters-deepstream docker image | |
uses: docker/build-push-action@v4 | |
with: | |
file: ${{ matrix.docker_file }} | |
tags: | | |
${{ env.REGISTRY }}/${{ github.repository_owner }}/savant-adapters-${{ matrix.docker_suffix }}:latest | |
build-args: | | |
SAVANT_VERSION=${{ needs.get-version.outputs.savant_version }} | |
DEEPSTREAM_VERSION=${{ needs.get-version.outputs.deepstream_version }} | |
platforms: ${{ matrix.arch }} | |
target: adapters | |
push: true | |
# build adapter's dockers (except deepstream adapters) | |
build-adapters: | |
needs: get-version | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- docker_file: docker/Dockerfile.adapters-gstreamer | |
docker_image: savant-adapters-gstreamer | |
arch: linux/amd64 | |
- docker_file: docker/Dockerfile.adapters-gstreamer | |
docker_image: savant-adapters-gstreamer-l4t | |
arch: linux/arm64 | |
- docker_file: docker/Dockerfile.adapters-py | |
docker_image: savant-adapters-py | |
arch: linux/amd64 | |
- docker_file: docker/Dockerfile.adapters-py | |
docker_image: savant-adapters-py-l4t | |
arch: linux/arm64 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Log in to the container registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up docker buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and push docker image | |
uses: docker/build-push-action@v4 | |
with: | |
file: ${{ matrix.docker_file }} | |
tags: | | |
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ matrix.docker_image }}:latest | |
platforms: ${{ matrix.arch }} | |
push: true |