Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nightly build action of demo pipeline #85

Merged
merged 14 commits into from
Jun 19, 2024
Merged
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
Loading