File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : publish docker image
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' v*'
7
+
8
+ jobs :
9
+ push_to_registry :
10
+ name : Docker
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Check out the repo
14
+ uses : actions/checkout@v3
15
+
16
+ - name : Set up QEMU
17
+ uses : docker/setup-qemu-action@v1
18
+
19
+ - name : Set up Docker Buildx
20
+ id : buildx
21
+ uses : docker/setup-buildx-action@v1
22
+
23
+ - name : Log in to GitHub Container Registry
24
+ uses : docker/login-action@v2
25
+ with :
26
+ registry : ghcr.io
27
+ username : ${{ github.actor }}
28
+ password : ${{ secrets.GITHUB_TOKEN }}
29
+
30
+ - name : Extract metadata (tags, labels) for Docker
31
+ id : meta
32
+ uses : docker/metadata-action@v3
33
+ with :
34
+ images : ghcr.io/${{ github.repository }}
35
+
36
+ - name : Build and push Docker image
37
+ uses : docker/build-push-action@v2
38
+ with :
39
+ context : .
40
+ platforms : linux/amd64
41
+ builder : ${{ steps.buildx.outputs.name }}
42
+ push : ${{ github.event_name != 'pull_request' }}
43
+ tags : |
44
+ ghcr.io/${{ github.repository }}:latest
45
+ ${{ steps.meta.outputs.tags }}
46
+ labels : ${{ steps.meta.outputs.labels }}
47
+ cache-from : type=gha
48
+ cache-to : type=gha,mode=max
You can’t perform that action at this time.
0 commit comments