Build Docker Windows images #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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 # checkout | |
packages: write # publish Docker packages | |
runs-on: windows-2019 | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
logout: false | |
- name: Build and push Docker image | |
run: | | |
FULL_IMAGE=ghcr.io/${{ github.repository }}/${{ 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 |