Skip to content

Build and push demo pipeline image #144

Build and push demo pipeline image

Build and push demo pipeline image #144

name: Build and push demo pipeline image
on:
schedule:
- cron: '0 2 * * 0' # 02:00 AM UTC every Sunday
jobs:
build-and-push-demo:
if: github.repository_owner == 'asam-ev'
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: main
- 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 }}