Skip to content

Commit 3b197d3

Browse files
committed
ci(deploy): pass VITE build args (commit sha/time) to docker build
1 parent e78e2c7 commit 3b197d3

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/docker-deploy.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,20 @@ jobs:
3131

3232
- name: Build and push editor image
3333
run: |
34-
docker build -t ${{ steps.registry.outputs.registry }}/app-scripting-editor:latest .
34+
docker build \
35+
--build-arg VITE_APP_BUILD_TIME=${{ github.event.head_commit.timestamp }} \
36+
--build-arg VITE_APP_COMMIT_SHA=${{ github.sha }} \
37+
--build-arg VITE_APP_VERSION=1.0.0 \
38+
-t ${{ steps.registry.outputs.registry }}/app-scripting-editor:latest .
3539
docker push ${{ steps.registry.outputs.registry }}/app-scripting-editor:latest
3640
3741
- name: Build and push editor-api image
3842
run: |
39-
docker build -t ${{ steps.registry.outputs.registry }}/app-scripting-editor-api:latest ./server
43+
docker build \
44+
--build-arg VITE_APP_BUILD_TIME=${{ github.event.head_commit.timestamp }} \
45+
--build-arg VITE_APP_COMMIT_SHA=${{ github.sha }} \
46+
--build-arg VITE_APP_VERSION=1.0.0 \
47+
-t ${{ steps.registry.outputs.registry }}/app-scripting-editor-api:latest ./server
4048
docker push ${{ steps.registry.outputs.registry }}/app-scripting-editor-api:latest
4149
4250
deploy-to-appservice:

0 commit comments

Comments
 (0)