Skip to content

Docker Image CI

Docker Image CI #36

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
schedule:
- cron: "0 0 * * 0"
jobs:
build:
strategy:
matrix:
WIN_VER: ["2022", "2019"]
runs-on: windows-${{ matrix.WIN_VER }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build
run: |
$TAGS = "-t ${{ secrets.DOCKERHUB_USERNAME }}/chocolatey:ltsc${{ matrix.win_ver }}"
if ( ${{ strategy.job-index }} -eq 0 ) { $TAGS += " -t ${{ secrets.DOCKERHUB_USERNAME }}/chocolatey" }
cmd /c "docker build $TAGS --build-arg WIN_VER=ltsc${{ matrix.WIN_VER }} ."
- name: Push
run: docker push amitie10g/chocolatey --all-tags