Skip to content

Add nightly build action of demo pipeline #4

Add nightly build action of demo pipeline

Add nightly build action of demo pipeline #4

name: Build and push demo pipeline Image
on:
schedule:
- cron: '0 4 * * *' # 4 AM UTC every day
# execute on every PR made targeting the branches bellow
pull_request:
branches:
- master
- develop # can be removed on master merge
paths: # we only include paths critical for building to avoid unnecessary runs
- src/**
- include/**
- scripts/cmake/**
- test/**
- .github/workflows/**
- doc/**
- runtime/**
- docker/**
# execute on every push made targeting the branches bellow
push:
branches:
- master
- develop # can be removed on master merge
paths: # we only include paths critical for building to avoid unnecessary runs
- src/**
- include/**
- scripts/cmake/**
- test/**
- .github/workflows/**
- doc/**
- runtime/**
- docker/**
jobs:
build-and-push-demo:
runs-on: ubuntu-22.04
permissions:
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get current date
id: date
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: docker/Dockerfile.linux
push: true
target: demo_pipeline
tags: |
ghcr.io/${{ github.repository_owner }}/qc-framework:demo-pipeline-${{ env.DATE }}
ghcr.io/${{ github.repository_owner }}/qc-framework:demo-pipeline-latest