|
7 | 7 |
|
8 | 8 | permissions: |
9 | 9 | contents: write |
| 10 | + packages: write |
10 | 11 |
|
11 | 12 | jobs: |
12 | 13 | build-binaries: |
@@ -143,9 +144,54 @@ jobs: |
143 | 144 | path: out/* |
144 | 145 | if-no-files-found: error |
145 | 146 |
|
| 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 | + |
146 | 192 | release: |
147 | 193 | 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] |
149 | 195 | runs-on: ubuntu-latest |
150 | 196 | steps: |
151 | 197 | - name: Download artifacts |
|
0 commit comments