Skip to content

Commit 67cba02

Browse files
committed
build docker image
1 parent 4ea5b3e commit 67cba02

1 file changed

Lines changed: 47 additions & 1 deletion

File tree

.github/workflows/release.yaml

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
permissions:
99
contents: write
10+
packages: write
1011

1112
jobs:
1213
build-binaries:
@@ -143,9 +144,54 @@ jobs:
143144
path: out/*
144145
if-no-files-found: error
145146

147+
build-docker:
148+
name: Build & push Docker images
149+
runs-on: ubuntu-latest
150+
steps:
151+
- name: Checkout
152+
uses: actions/checkout@v4
153+
154+
- name: Resolve version
155+
id: version
156+
run: |
157+
TAG="${GITHUB_REF_NAME}"
158+
VERSION="${TAG#v}"
159+
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
160+
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
161+
162+
- name: Set up QEMU
163+
uses: docker/setup-qemu-action@v3
164+
165+
- name: Set up Docker Buildx
166+
uses: docker/setup-buildx-action@v3
167+
168+
- name: Log in to GHCR
169+
uses: docker/login-action@v3
170+
with:
171+
registry: ghcr.io
172+
username: ${{ github.actor }}
173+
password: ${{ secrets.GITHUB_TOKEN }}
174+
175+
- name: Build & push lakefs image
176+
uses: docker/build-push-action@v6
177+
with:
178+
context: .
179+
file: Dockerfile
180+
target: lakefs
181+
platforms: linux/amd64
182+
push: true
183+
build-args: |
184+
VERSION=${{ steps.version.outputs.version }}
185+
tags: |
186+
ghcr.io/invergent-ai/surogate-hub:${{ steps.version.outputs.version }}
187+
ghcr.io/invergent-ai/surogate-hub:${{ steps.version.outputs.tag }}
188+
ghcr.io/invergent-ai/surogate-hub:latest
189+
cache-from: type=gha
190+
cache-to: type=gha,mode=max
191+
146192
release:
147193
name: Create GitHub Release
148-
needs: [build-binaries, build-python-client, build-java-client]
194+
needs: [build-binaries, build-python-client, build-java-client, build-docker]
149195
runs-on: ubuntu-latest
150196
steps:
151197
- name: Download artifacts

0 commit comments

Comments
 (0)