Skip to content

Build Images from packages #14

Build Images from packages

Build Images from packages #14

Workflow file for this run

# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright © 2025 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
# Matthias Kretz <m.kretz@gsi.de>
name: Build Images from packages
on:
workflow_dispatch: # Allows manual trigger via GitHub UI
schedule:
- cron: '0 1 1 * *' # At 01:00 UTC every 1st day of the month
permissions:
contents: read
packages: write # Required to push to GHCR
jobs:
common:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build and publish
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.common
push: true
tags: ghcr.io/${{ github.repository }}/common
cmake-version-check:
needs: common
runs-on: ubuntu-latest
container:
image: ghcr.io/mattkretz/cplusplus-ci/common
steps:
- name: Set PATH
run: echo /opt/cmake-latest/bin >> $GITHUB_PATH
- name: Run cmake
run: cmake --version | grep 4.1.1
after-common:
needs: common
strategy:
matrix:
image: [clang14, clang15, clang16, clang17, clang18, gcc9, gcc10, gcc11, gcc12, gcc13, gcc14, doxygen]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build and publish
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.${{ matrix.image }}
push: true
tags: ghcr.io/${{ github.repository }}/${{ matrix.image }}
upstream-clang:
needs: after-common
strategy:
fail-fast: false
matrix:
image: [clang19, clang20, clang21, clang22]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build and publish
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.${{ matrix.image }}
push: true
tags: ghcr.io/${{ github.repository }}/${{ matrix.image }}