forked from adoptium/infrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.38 KB
/
build_windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Docker Windows
on:
pull_request:
paths:
- .github/workflows/build_windows.yml
- ansible/DockerFile.Windows2016_Base
- ansible/Dockerfile.Windows2016_VS2013
- ansible/Dockerfile.Windows2016_VS2017
branches:
- master
push:
paths:
- .github/workflows/build_windows.yml
- ansible/DockerFile.Windows2016_Base
- ansible/Dockerfile.Windows2016_VS2013
- ansible/Dockerfile.Windows2016_VS2017
branches:
- master
jobs:
build-and-push-windows2016:
name: Windows 2016
runs-on: windows-2016
steps:
- uses: actions/checkout@v2
- name: Docker Build Windows 2016 Base Image to Docker Hub
run: docker build -t adoptopenjdk/windows2016_build_image:base -f ansible/Dockerfile.windows2016_Base .
- name: Docker Build Windows 2016 VS2017 Image to Docker Hub
run: docker build -t adoptopenjdk/windows2016_build_image:vs2017 -f ansible/Dockerfile.windows2016_VS2017 .
- name: Docker login
uses: azure/docker-login@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
if: github.ref == 'refs/heads/master'
- name: Push Windows images to Docker Hub
run: |
docker push adoptopenjdk/windows2016_build_image:base
docker push adoptopenjdk/windows2016_build_image:vs2017
if: github.ref == 'refs/heads/master'