Skip to content

Commit

Permalink
docker: add action to deploy windows build image
Browse files Browse the repository at this point in the history
  • Loading branch information
gdams committed Oct 15, 2024
1 parent 6105af8 commit 47576f2
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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

permissions:
id-token: write
contents: read

jobs:
build:
if: startsWith(github.repository, 'adoptium/')
runs-on: windows-latest
steps:
- 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: Login to Azure Container Registry
if: github.ref == 'refs/heads/master'
run: az acr login --name adoptium

- name: Build container image and push to Azure
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
with:
file: ansible/docker/Dockerfile.win2022
tags: adoptium.azurecr.io/windows2022_build_image:latest
push: github.ref == 'refs/heads/master'

0 comments on commit 47576f2

Please sign in to comment.