File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build Release
2
+
3
+ on :
4
+ release :
5
+ types : [published]
6
+ workflow_dispatch :
7
+ inputs :
8
+ tag :
9
+ description : ' Tag to build (leave empty for latest)'
10
+ required : false
11
+ default : ' '
12
+
13
+ permissions :
14
+ packages : write
15
+ contents : write
16
+
17
+ jobs :
18
+ build_endorser :
19
+ name : ' Build Endorser'
20
+ runs-on : ubuntu-latest
21
+ if : github.repository_owner == 'openwallet-foundation'
22
+ steps :
23
+ - uses : actions/checkout@v4
24
+ with :
25
+ fetch-depth : 0
26
+ ref : ${{ github.event.inputs.tag || github.ref }}
27
+
28
+ - name : Set up Docker Buildx
29
+ uses : docker/setup-buildx-action@v3
30
+
31
+ - name : Login to GitHub Container Registry
32
+ uses : docker/login-action@v3
33
+ with :
34
+ registry : ghcr.io
35
+ username : ${{ github.actor }}
36
+ password : ${{ secrets.GITHUB_TOKEN }}
37
+
38
+ - name : Prepare docker tags for image
39
+ id : meta
40
+ uses : docker/metadata-action@v5
41
+ with :
42
+ images : ghcr.io/${{ github.repository }}/endorser
43
+ tags : |
44
+ type=raw,value=${{ github.event.inputs.tag }}
45
+ type=semver,pattern={{version}}
46
+ type=semver,pattern={{major}}.{{minor}}
47
+ type=ref,event=tag
48
+
49
+ - name : Build and push image
50
+ id : builder
51
+ uses : docker/build-push-action@v6
52
+ with :
53
+ context : ./
54
+ file : ./endorser/Dockerfile.endorser
55
+ push : true
56
+ tags : ${{ steps.meta.outputs.tags }}
57
+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments