File tree 1 file changed +43
-0
lines changed
1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish container image to GitHub Packages
2
+
3
+ on :
4
+ release :
5
+ types : [published]
6
+
7
+ env :
8
+ REGISTRY : ghcr.io
9
+ IMAGE_NAME : ${{ github.repository }}
10
+
11
+ jobs :
12
+ publish-container-image :
13
+ runs-on : ubuntu-latest
14
+ permissions :
15
+ packages : write
16
+ steps :
17
+ - name : Set up QEMU
18
+ uses : docker/setup-qemu-action@v2
19
+ - name : Set up Docker Buildx
20
+ uses : docker/setup-buildx-action@v2
21
+ - name : Log in to the Container registry
22
+
23
+ with :
24
+ registry : ${{ env.REGISTRY }}
25
+ username : ${{ github.actor }}
26
+ password : ${{ github.token }}
27
+ - name : Extract metadata (tags, labels) for Docker
28
+ id : meta
29
+
30
+ with :
31
+ flavor : latest=true
32
+ tags : type=raw,value=${{ github.ref_name }}
33
+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
34
+ - name : Build and push Docker image
35
+
36
+ with :
37
+ context : " {{defaultContext}}:src"
38
+ file : CarbonAware.WebApi/src/Dockerfile
39
+ platforms : linux/amd64,linux/arm64
40
+ push : true
41
+ tags : ${{ steps.meta.outputs.tags }}
42
+ labels : ${{ steps.meta.outputs.labels }}
43
+ provenance : false
You can’t perform that action at this time.
0 commit comments