Skip to content

chore(deps): update docker/build-push-action action to v7.1.0 #10544

chore(deps): update docker/build-push-action action to v7.1.0

chore(deps): update docker/build-push-action action to v7.1.0 #10544

Workflow file for this run

---
# Automatic building in CI
name: "Matrix Build"
on:
push:
pull_request:
branches: [main, develop]
merge_group:
permissions:
contents: read
jobs:
build:
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04, windows-2022, windows-2025]
fail-fast: false
runs-on: ${{matrix.os}}
permissions:
packages: write
env:
CMAKE_INSTALL_PREFIX: "${{ github.workspace }}/install"
steps:
- name: Checkout Sample-Server
uses: actions/checkout@v6
with:
path: Sample-Server
submodules: recursive
persist-credentials: false
- name: Set Windows CMAKE_GENERATOR 2019
if: matrix.os == 'windows-2022'
run: |
#shellcheck disable=SC2154
echo "CMAKE_GENERATOR=Visual Studio 17 2022">> "$env:GITHUB_ENV"
echo "ARG_CTEST=-C Debug">> "$env:GITHUB_ENV"
- name: Set Windows CMAKE_GENERATOR 2022
if: matrix.os == 'windows-2025'
run: |
#shellcheck disable=SC2154
echo "CMAKE_GENERATOR=Visual Studio 17 2022">> "$env:GITHUB_ENV"
echo "ARG_CTEST=-C Debug">> "$env:GITHUB_ENV"
- name: Build server with dependencies
# yamllint disable rule:line-length
run: |
mkdir -p build
cd build
cmake ../Sample-Server/.github/ -DCMAKE_INSTALL_PREFIX:PATH=${{ env.CMAKE_INSTALL_PREFIX }}
cmake --build . --parallel "$(nproc)"
# yamllint enable rule:line-length
- name: Upload Artefacts
uses: actions/upload-artifact@v7
with:
name: Sample-Server-${{matrix.os}}
path: ${{ env.CMAKE_INSTALL_PREFIX }}/bin
- name: Test Sample-Server
run: |
cd build/SampleServer-build/
ctest --output-on-failure ${{ env.ARG_CTEST }}
docker:
runs-on: ubuntu-24.04
permissions:
packages: write
steps:
- name: Checkout Sample-Server
uses: actions/checkout@v6
with:
path: Sample-Server
submodules: recursive
persist-credentials: false
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Buildx
uses: docker/setup-buildx-action@v4.0.0
- name: Set Registry and prepare Image Names
# yamllint disable rule:line-length
run: |
#!/bin/bash
echo IMAGE_REPOSITORY="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV"
echo IMAGE_TAG="$(echo "${{ github.ref }}" | tr '[:upper:]' '[:lower:]' | awk '{sub(/([^\/]*\/){2}/,""); gsub(/\/|_/, "-")}1')" >> "$GITHUB_ENV"
if [ "${{ github.server_url }}" = "https://codeberg.org" ]; then
echo "REGISTRY=codeberg.org" >> "$GITHUB_ENV"
echo "REGISTRY_TOKEN=${{ secrets.REGISTRY_TOKEN }}" >> "$GITHUB_ENV"
else
echo "REGISTRY=ghcr.io" >> "$GITHUB_ENV"
echo "REGISTRY_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> "$GITHUB_ENV"
fi
# yamllint enable rule:line-length
- name: Login to Container Registry
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v4.1.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ env.REGISTRY_TOKEN }}
- name: Build and Push Container
uses: "docker/build-push-action@v7.1.0"
with:
provenance: false
file: "./Sample-Server/Dockerfile"
context: ./Sample-Server
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_REPOSITORY }}:${{ env.IMAGE_TAG }}