File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ push :
6
+ branches :
7
+ - " main"
8
+ tags :
9
+ - " v[0-9]+.[0-9]+.[0-9]+"
10
+
11
+ env :
12
+ REGISTRY : ghcr.io
13
+ IMAGE_NAME : ${{ github.repository }}
14
+
15
+ jobs :
16
+ docker :
17
+ name : Docker build
18
+ runs-on : ubuntu-latest
19
+ outputs :
20
+ image_tag : ${{ steps.meta.outputs.tags }}
21
+ permissions :
22
+ contents : read
23
+ packages : write
24
+ steps :
25
+ - uses : actions/checkout@v4
26
+ with :
27
+ fetch-depth : 1
28
+ - name : Set up QEMU
29
+ uses : docker/setup-qemu-action@v3
30
+ - name : Set up Docker Buildx
31
+ uses : docker/setup-buildx-action@v3
32
+ - name : Extract metadata (tags, labels) for Docker
33
+ id : meta
34
+ uses : docker/metadata-action@v5
35
+ with :
36
+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
37
+ - name : Log in to the Container registry
38
+ uses : docker/login-action@v3
39
+ with :
40
+ registry : ${{ env.REGISTRY }}
41
+ username : ${{ github.actor }}
42
+ password : ${{ secrets.GITHUB_TOKEN }}
43
+ - name : Docker Build and push
44
+ uses : docker/build-push-action@v5
45
+ with :
46
+ context : .
47
+ platforms : ' linux/amd64,linux/arm64/v8'
48
+ tags : ${{ steps.meta.outputs.tags }}
49
+ push : true
50
+ provenance : false
51
+ labels : ${{ steps.meta.outputs.labels }}
52
+ build-args : |-
53
+ GIT_TAG=${{ github.ref_type == 'tag' && github.ref_name || github.sha }}
You can’t perform that action at this time.
0 commit comments