File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Push Images
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ tags :
8
+ - ' v*.*.*'
9
+ workflow_dispatch :
10
+
11
+ jobs :
12
+ bake :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - name : Checkout
16
+ uses : actions/checkout@v4
17
+
18
+ - name : Set up Docker Buildx
19
+ uses : docker/setup-buildx-action@v3
20
+
21
+ - name : Log in to Docker Hub
22
+ uses : docker/login-action@v3
23
+ with :
24
+ registry : ghcr.io
25
+ username : ${{ github.actor }} # Docker Hub username (use GitHub actor if using GHCR)
26
+ password : ${{ secrets.GITHUB_TOKEN }}
27
+
28
+ - name : Set up QEMU
29
+ uses : docker/setup-qemu-action@v3
30
+
31
+ - name : Build and push
32
+ uses : docker/bake-action@v6
33
+ with :
34
+ # Points to your bake file - adjust if you named it differently
35
+ files : |
36
+ ./docker-bake.hcl
37
+ # Set to true to push images to registry
38
+ push : true
39
+ # Optional: Override variables defined in the bake file
40
+ set : |
41
+ *.labels.org.opencontainers.image.created=${{ fromJSON(github.event.head_commit.timestamp || '"2025-04-27T10:34:00Z"') }}
42
+ *.labels.org.opencontainers.image.revision=${{ github.sha }}
43
+ *.cache-from=type=gha
44
+ *.cache-to=type=gha,mode=max
You can’t perform that action at this time.
0 commit comments