File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Push Docker Image
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - ' **' # Trigger on pushes to any branch
7
+
8
+ jobs :
9
+ build :
10
+ if : contains(github.event.head_commit.message, '#build')
11
+ runs-on : ubuntu-latest
12
+
13
+ steps :
14
+ - name : Checkout Code
15
+ uses : actions/checkout@v3
16
+
17
+ - name : Set up Docker Buildx
18
+ uses : docker/setup-buildx-action@v2
19
+
20
+ - name : Log in to GitHub Container Registry
21
+ uses : docker/login-action@v2
22
+ with :
23
+ username : ${{ github.actor }}
24
+ password : ${{ secrets.GHCR_PAT }}
25
+
26
+ - name : Build and Push Docker Image
27
+ uses : docker/build-push-action@v4
28
+ with :
29
+ context : .
30
+ push : true
31
+ tags : |
32
+ ghcr.io/${{ github.repository_owner }}/gomarks:${{ github.ref_name }}
33
+ ghcr.io/${{ github.repository_owner }}/gomarks:latest
34
+
You can’t perform that action at this time.
0 commit comments