Skip to content

Use Docker bake and quiet apt [11] #49

Use Docker bake and quiet apt [11]

Use Docker bake and quiet apt [11] #49

Workflow file for this run

name: Build Docker Images
on: push
jobs:
define-matrix:
runs-on: ubuntu-latest
outputs:
cmake_versions: ${{ steps.matrix.outputs.cmake_versions }}
qts: ${{ steps.matrix.outputs.qts }}
steps:
- name: Define Matrix
id: matrix
run: |
echo 'cmake_versions=["3.30.6", "3.31.2"]' >> "$GITHUB_OUTPUT"
echo 'qts=[{"version": "6.6.3", "arch": "gcc_64"}, {"version": "6.7.3", "arch": "linux_gcc_64"}, {"version": "6.8.1", "arch": "linux_gcc_64"}]' >> "$GITHUB_OUTPUT"
cmake:
name: "CMake Docker builds"
needs: define-matrix
strategy:
fail-fast: false
matrix:
cmake_version: ${{ fromJSON(needs.define-matrix.outputs.cmake_versions) }}
qt: ${{ fromJSON(needs.define-matrix.outputs.qts) }}
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
uses: docker/bake-action@v5
with:
push: ${{ github.event_name != 'pull_request' }}
env:
CMAKE_VERSION: ${{ matrix.cmake_version }}
CMAKE_VERSIONS: ${{ needs.define-matrix.outputs.cmake_versions }}
QT: ${{ toJSON(matrix.qt) }}
QTS: ${{ needs.define-matrix.outputs.qts }}