Skip to content

Update Windows runner to 2.311.0. #83

Update Windows runner to 2.311.0.

Update Windows runner to 2.311.0. #83

name: Docker (Windows)
on:
schedule:
- cron: '0 9 * * 3'
push:
branches: [ "master" ]
paths-ignore: [ "linux/**" ]
pull_request:
branches: [ "master" ]
env:
REGISTRY: ghcr.io
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 2
matrix:
os: [windows-2022]
include:
- os: windows-2022
file: Dockerfile.windows
tag: ltsc2022
base: 4.8.1-windowsservercore-ltsc2022
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: image_name
name: Make image name lowercase
uses: ASzc/change-string-case-action@v5
with:
string: ${{ github.repository }}
- name: Build Docker image
run: |
docker build . --pull --tag ${{ env.REGISTRY }}/${{ steps.image_name.outputs.lowercase }}:${{ matrix.tag }} --build-arg BASE=${{ matrix.base }} --build-arg ARIAL_TTF_URL=${{ secrets.ARIAL_TTF_URL }}
working-directory: windows
- name: Push Docker image
run: |
docker push ${{ env.REGISTRY }}/${{ steps.image_name.outputs.lowercase }}:${{ matrix.tag }}
working-directory: windows
- name: Build Xamarin Docker image
run: |
docker build . -f xamarin.Dockerfile --pull --tag ${{ env.REGISTRY }}/${{ steps.image_name.outputs.lowercase }}:${{ matrix.tag }}-xamarin --build-arg BASE=${{ matrix.tag }}
working-directory: windows
- name: Push Xamarin Docker image
run: |
docker push ${{ env.REGISTRY }}/${{ steps.image_name.outputs.lowercase }}:${{ matrix.tag }}-xamarin
working-directory: windows