Skip to content

Commit 1abf70a

Browse files
committed
ci: use build-push-action for docker build job
TICKET: VL-3538
1 parent 7de29c6 commit 1abf70a

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,29 @@ jobs:
271271
with:
272272
ref: ${{ github.event.pull_request.head.sha }}
273273

274-
- name: Setup Docker compatibility with Podman
275-
run: sudo ln -sf /usr/bin/podman /usr/local/bin/docker
274+
- name: Generate build info
275+
id: build-info
276+
run: |
277+
VERSION=$(jq -r '.version' ./modules/express/package.json)
278+
DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
279+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
280+
echo "date=$DATE" >> "$GITHUB_OUTPUT"
281+
282+
- name: Set up Docker Buildx
283+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
276284

277-
- name: Build BitGoJS Express Docker Image
278-
run: ./scripts/build-docker-express.sh
285+
- name: Build Express Docker image
286+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
287+
with:
288+
context: .
289+
file: ./Dockerfile
290+
push: false
291+
tags: |
292+
bitgo/express:${{ github.sha }}
293+
build-args: |
294+
VERSION=${{ steps.build-info.outputs.version }}
295+
BUILD_DATE=${{ steps.build-info.outputs.date }}
296+
GIT_HASH=${{ github.sha }}
279297
280298
dockerfile-check:
281299
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)