-
-
Notifications
You must be signed in to change notification settings - Fork 102
48 lines (41 loc) · 1.52 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
47
48
name: Docker (Windows)
on:
pull_request:
paths:
- .github/workflows/build_windows.yml
- ansible/docker/Dockerfile.win2022
branches:
- master
push:
paths:
- .github/workflows/build_windows.yml
- ansible/docker/Dockerfile.win2022
branches:
- master
# Cancel existing runs if user makes another push.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
id-token: write
contents: read
jobs:
build:
if: startsWith(github.repository, 'adoptium/')
runs-on: windows-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Login to our Azure subscription
if: github.ref == 'refs/heads/master'
uses: azure/login@a65d910e8af852a8061c627c456678983e180302 # v2.2.0
with:
client-id: ${{ secrets.AZURE_CLIENT_ID_OIDC }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Build container image
run: docker build -t adoptium.azurecr.io/windows2022_build_image:latest --build-arg git_ref=${{ github.ref }} -f ansible/docker/Dockerfile.win2022 .
- name: Push container image to ACR
if: github.ref == 'refs/heads/master'
run: |
az acr login --name adoptium
docker push adoptium.azurecr.io/windows2022_build_image:latest