Support New Database System #18
Workflow file for this run
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: Docker Build and Push to GHCR | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Free Disk Space (Ubuntu) | |
uses: jlumbroso/free-disk-space@main | |
with: | |
tool-cache: false | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Log in to GitHub Container Registry | |
if: github.event_name == 'push' | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Log in to Docker Hub | |
if: github.event_name == 'push' | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Download Deps | |
run: | | |
git clone -b 4.9.0 --depth=1 https://github.com/opencv/opencv.git | |
git clone -b 4.9.0 --depth=1 https://github.com/opencv/opencv_contrib.git | |
git clone --branch n12.2.72.0 --depth 1 https://git.videolan.org/git/ffmpeg/nv-codec-headers.git | |
git clone -b n7.1 --depth=1 https://git.ffmpeg.org/ffmpeg.git | |
- name: Build Docker image | |
if: github.event_name != 'push' | |
run: | | |
docker build . | |
- name: Push Docker image | |
if: github.event_name == 'push' | |
run: | | |
# docker push ghcr.io/${{ github.repository }}:latest | |
docker build -t ${{ secrets.DOCKER_USERNAME }}/horus_inference_server:latest . | |
docker push ${{ secrets.DOCKER_USERNAME }}/horus_inference_server:latest |