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