From 252732b3d7af7f78618e877479b85d4d611a61f4 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 11 Mar 2024 20:33:14 +0100 Subject: [PATCH] Split Windows/Linux docker workflows --- ...ild-docker-images.yml => docker-linux.yml} | 39 +------------- .github/workflows/docker-windows.yml | 51 +++++++++++++++++++ 2 files changed, 53 insertions(+), 37 deletions(-) rename .github/workflows/{build-docker-images.yml => docker-linux.yml} (75%) create mode 100644 .github/workflows/docker-windows.yml diff --git a/.github/workflows/build-docker-images.yml b/.github/workflows/docker-linux.yml similarity index 75% rename from .github/workflows/build-docker-images.yml rename to .github/workflows/docker-linux.yml index 2f3493ef9..90fadbcf0 100644 --- a/.github/workflows/build-docker-images.yml +++ b/.github/workflows/docker-linux.yml @@ -5,7 +5,7 @@ # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # -name: Build Docker images +name: Build Linux Docker images on: workflow_dispatch: @@ -15,7 +15,7 @@ on: jobs: - linux-images: + docker-linux: strategy: matrix: include: @@ -71,38 +71,3 @@ jobs: build-args: ${{ matrix.build-args }} platforms: ${{ matrix.platforms }} tags: ghcr.io/anarthal-containers/${{ matrix.image }}:${{ github.sha }}, ghcr.io/anarthal-containers/${{ matrix.image }}:latest - - windows-images: - strategy: - matrix: - include: - - { image: build-msvc14_1, base-image: "cppalliance/dronevs2017:1" } - - { image: build-msvc14_2, base-image: "cppalliance/dronevs2019:1" } - - { image: build-msvc14_3, base-image: "cppalliance/dronevs2022:1" } - - permissions: - contents: read - packages: write - - runs-on: windows-2019 - - defaults: - run: - shell: bash - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Log in to the Container registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: anarthal-containers - password: ${{ secrets.ANARTHAL_CONTAINERS_TOKEN }} - - - name: Build and push Docker image - run: | - FULL_IMAGE=ghcr.io/anarthal-containers/${{ matrix.image }} - docker build -f tools/docker/build-msvc.dockerfile --build-arg BASE_IMAGE=${{ matrix.base-image }} -t $FULL_IMAGE:$GITHUB_SHA -t $FULL_IMAGE:latest . - docker push $FULL_IMAGE --all-tags \ No newline at end of file diff --git a/.github/workflows/docker-windows.yml b/.github/workflows/docker-windows.yml new file mode 100644 index 000000000..160086aa6 --- /dev/null +++ b/.github/workflows/docker-windows.yml @@ -0,0 +1,51 @@ +# +# Copyright (c) 2019-2024 Ruben Perez Hidalgo (rubenperez038 at gmail dot com) +# +# Distributed under the Boost Software License, Version 1.0. (See accompanying +# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +# + +name: Build Docker Windows images + +on: + workflow_dispatch: + push: + paths: + - tools/docker/build-msvc.dockerfile + + +jobs: + docker-windows: + strategy: + matrix: + include: + - { image: build-msvc14_1, base-image: "cppalliance/dronevs2017:1" } + - { image: build-msvc14_2, base-image: "cppalliance/dronevs2019:1" } + - { image: build-msvc14_3, base-image: "cppalliance/dronevs2022:1" } + + permissions: + contents: read + packages: write + + runs-on: windows-2019 + + defaults: + run: + shell: bash + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: anarthal-containers + password: ${{ secrets.ANARTHAL_CONTAINERS_TOKEN }} + + - name: Build and push Docker image + run: | + FULL_IMAGE=ghcr.io/anarthal-containers/${{ matrix.image }} + docker build -f tools/docker/build-msvc.dockerfile --build-arg BASE_IMAGE=${{ matrix.base-image }} -t $FULL_IMAGE:$GITHUB_SHA -t $FULL_IMAGE:latest . + docker push $FULL_IMAGE --all-tags \ No newline at end of file