Skip to content

Commit

Permalink
Add nightly build action of demo pipeline (#85)
Browse files Browse the repository at this point in the history
Signed-off-by: romanodanilo <[email protected]>

Signed-off-by: romanodanilo <[email protected]>

Signed-off-by: hoangtungdinh <[email protected]>

Signed-off-by: hoangtungdinh <[email protected]>
  • Loading branch information
romanodanilo authored Jun 19, 2024
1 parent b5e3921 commit 1844d28
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .github/workflows/build-and-push-demo-pipeline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build and push demo pipeline image

on:
schedule:
- cron: '0 4 * * *' # 04:00 AM UTC every day

jobs:
build-and-push-demo:
runs-on: ubuntu-22.04

permissions:
contents: read
packages: write

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: develop # @TODO remove it later

- 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@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: docker/Dockerfile.linux
push: true
target: demo_pipeline
tags: |
ghcr.io/${{ github.repository_owner }}/qc-framework:demo-pipeline-latest
ghcr.io/${{ github.repository_owner }}/qc-framework:demo-pipeline-${{ env.DATE }}
6 changes: 5 additions & 1 deletion docker/Dockerfile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ RUN git clone --single-branch --branch develop https://github.com/asam-ev/qc-ope
cp /app/demo_pipeline/xodrBundle /home/root/qc-build/bin/xodrBundle && \
rm -rf /app/qc-opendrive/.git


# Create and setup demo and runtime virtual envs
RUN python3 -m venv demo-pipeline-venv && \
source demo-pipeline-venv/bin/activate && \
python3 -m pip install --no-cache-dir -r /app/demo_pipeline/requirements.txt
Expand Down Expand Up @@ -116,6 +116,10 @@ CMD ctest --test-dir /app/framework/build -C Release && cp /app/framework/build/

FROM ubuntu:22.04 as demo_pipeline

LABEL org.opencontainers.image.source="https://github.com/asam-ev/qc-framework"
LABEL org.opencontainers.image.description="QC Framework demo pipeline"
LABEL org.opencontainers.image.licenses="MPL-2.0"

# Dependancies installation currently required by ResultPooling and TextReport modules
RUN echo "Installing Qt..." && \
apt update && apt install -y \
Expand Down

0 comments on commit 1844d28

Please sign in to comment.