Skip to content

Commit deceddd

Browse files
committed
ci: build docker image on main commits
Signed-off-by: Xe Iaso <xe@tigrisdata.com>
1 parent 9256013 commit deceddd

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/publish.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Publish container image
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
packages: write
11+
12+
jobs:
13+
docker:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Set up QEMU (multi-arch)
20+
uses: docker/setup-qemu-action@v3
21+
22+
- name: Set up Docker Buildx
23+
uses: docker/setup-buildx-action@v3
24+
25+
- name: Log in to GHCR
26+
uses: docker/login-action@v3
27+
with:
28+
registry: ghcr.io
29+
username: ${{ github.actor }}
30+
password: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Build and push with Bake
33+
uses: docker/bake-action@v6
34+
with:
35+
files: |
36+
./docker-bake.hcl
37+
# Uses the default group in docker-bake.hcl which targets "www" (push=true)
38+
targets: default
39+
set: |
40+
*.cache-from=type=gha
41+
*.cache-to=type=gha,mode=max

0 commit comments

Comments
 (0)