Skip to content

Commit 4c638fe

Browse files
committed
Test OIDC creds
1 parent d4d5949 commit 4c638fe

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

.github/workflows/docker.yml

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Publish Docker image
22
on:
33
workflow_dispatch:
44
push:
5-
branches: [master, vnext]
6-
paths: ['src/Microsoft.OpenApi.Hidi/**', '.github/workflows/**']
5+
branches: [task/update-container-reference]
6+
paths: ["src/Microsoft.OpenApi.Hidi/**", ".github/workflows/**"]
77
env:
88
REGISTRY: msgraphprod.azurecr.io
99
IMAGE_NAME: public/openapi/hidi
@@ -16,27 +16,33 @@ jobs:
1616
steps:
1717
- name: Check out the repo
1818
uses: actions/checkout@v4
19-
- name: Login to GitHub package feed
20-
uses: docker/[email protected]
19+
# - name: Login to GitHub package feed
20+
# uses: docker/[email protected]
21+
# with:
22+
# username: ${{ secrets.ACR_USERNAME }}
23+
# password: ${{ secrets.ACR_PASSWORD }}
24+
# registry: ${{ env.REGISTRY }}
25+
- name: "Az CLI login"
26+
uses: azure/login@v1
2127
with:
22-
username: ${{ secrets.ACR_USERNAME }}
23-
password: ${{ secrets.ACR_PASSWORD }}
24-
registry: ${{ env.REGISTRY }}
28+
client-id: "64721008-1da6-49ea-a3d2-6beec11d9c65"
29+
tenant-id: "cdc5aeea-15c5-4db6-b079-fcadd2505dc2"
30+
subscription-id: "64721008-1da6-49ea-a3d2-6beec11d9c65"
2531
- run: |
2632
$content = [XML](Get-Content ./src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj)
2733
$version = $content.Project.PropertyGroup.Version
2834
echo "::set-output name=version::${version}"
2935
shell: pwsh
3036
id: getversion
3137
- name: Push to GitHub Packages - Nightly
32-
if: ${{ github.ref == 'refs/heads/vnext' }}
38+
if: ${{ github.ref == 'refs/heads/task/update-container-reference' }}
3339
uses: docker/[email protected]
3440
with:
3541
push: true
3642
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nightly
37-
- name: Push to GitHub Packages - Release
38-
if: ${{ github.ref == 'refs/heads/master' }}
39-
uses: docker/[email protected]
40-
with:
41-
push: true
42-
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.getversion.outputs.version }}
43+
# - name: Push to GitHub Packages - Release
44+
# if: ${{ github.ref == 'refs/heads/task/update-container-reference' }}
45+
# uses: docker/[email protected]
46+
# with:
47+
# push: true
48+
# tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.getversion.outputs.version }}

0 commit comments

Comments
 (0)