File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Docker image
2
+ on :
3
+ workflow_dispatch :
4
+ push :
5
+ tags : ["*"]
6
+ env :
7
+ REGISTRY : msgraphprod.azurecr.io
8
+ IMAGE_NAME : public/microsoftgraph/powershell
9
+ jobs :
10
+ push_to_registry :
11
+ environment :
12
+ name : acr
13
+ name : Push Docker image
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - name : Check out the repo
17
+ uses : actions/checkout@v4
18
+ - name : Login to GitHub package feed
19
+ uses : docker/login-action@v3.3.0
20
+ with :
21
+ username : ${{ secrets.ACR_USERNAME }}
22
+ password : ${{ secrets.ACR_PASSWORD }}
23
+ registry : ${{ env.REGISTRY }}
24
+
25
+ - name : Get truncated run number
26
+ id : getversion
27
+ run : |
28
+ $version = $Env:GITHUB_REF.replace("refs/tags/", "")
29
+ Write-Output "version=$version" >> $Env:GITHUB_OUTPUT
30
+ shell : pwsh
31
+ - name : Set up QEMU
32
+ uses : docker/setup-qemu-action@v3
33
+ - name : Set up Docker Buildx
34
+ uses : docker/setup-buildx-action@v3
35
+ - name : Push to GitHub Packages - Release
36
+ uses : docker/build-push-action@v6.5.0
37
+ with :
38
+ push : true
39
+ platforms : linux/amd64,linux/arm64/v8,linux/arm/v7
40
+ tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.getversion.outputs.version }}
41
+ build-args : |
42
+ VERSION=${{ steps.getversion.outputs.version }}
You can’t perform that action at this time.
0 commit comments