File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Docker Publish
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ paths-ignore :
8
+ - ' README.md'
9
+ - ' .gitignore'
10
+ - ' docker-compose.yml'
11
+ workflow_dispatch :
12
+
13
+ env :
14
+ REGISTRY : ghcr.io
15
+ IMAGE_NAME : ${{ github.repository }}
16
+
17
+ jobs :
18
+ build :
19
+ name : Build and push image
20
+ runs-on : self-hosted
21
+
22
+ steps :
23
+ - name : Set up Docker Buildx
24
+ uses : docker/setup-buildx-action@v3
25
+
26
+ - name : Login to GitHub Container Registry
27
+ uses : docker/login-action@v3
28
+ with :
29
+ registry : ghcr.io
30
+ username : ${{ github.actor }}
31
+ password : ${{ secrets.GITHUB_TOKEN }}
32
+
33
+ - name : Build and push
34
+ uses : docker/build-push-action@v6
35
+ with :
36
+ push : true
37
+ tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
You can’t perform that action at this time.
0 commit comments