Skip to content

Commit 390b6e6

Browse files
authored
fix(docker): return docker build and make it simpler
1 parent 690e364 commit 390b6e6

2 files changed

Lines changed: 49 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,50 @@ jobs:
879879
delimiter: ${{ matrix.delimiter }}
880880
target: ${{ env.target }}
881881

882+
# This docker image is used to run manticore-executor on Windows
883+
deploy-docker:
884+
name: Deploy docker
885+
runs-on: ubuntu-22.04
886+
needs:
887+
- pack
888+
- build-artifact
889+
- deploy
890+
steps:
891+
- name: Checkout
892+
uses: actions/checkout@v3
893+
- name: Download amd64 artifact
894+
uses: manticoresoftware/download_artifact_with_retries@main
895+
with:
896+
name: artifact-ubuntu-22.04-amd64
897+
path: .
898+
- name: Download arm64 artifact
899+
uses: manticoresoftware/download_artifact_with_retries@main
900+
with:
901+
name: artifact-ubuntu-22.04-arm64
902+
path: .
903+
- name: Extract binaries
904+
run: |
905+
for arch in amd64 arm64; do
906+
tar -xzf *-linux-${arch}.tar.gz
907+
cp *-linux-${arch}/${{ env.APP_NAME }} manticore-executor-${arch}
908+
chmod +x manticore-executor-${arch}
909+
done
910+
- name: Set up Docker Buildx
911+
uses: docker/setup-buildx-action@v2
912+
- name: Login to Docker Hub
913+
uses: docker/login-action@v3
914+
with:
915+
username: ${{ secrets.DOCKER_USER }}
916+
password: ${{ secrets.DOCKER_PASSWORD }}
917+
- name: Build and push docker image
918+
uses: docker/build-push-action@v3
919+
with:
920+
context: .
921+
file: ./Dockerfile-dist
922+
platforms: linux/amd64,linux/arm64
923+
push: true
924+
tags: ${{ env.DOCKER_TAG }}:${{ needs.pack.outputs.version }}
925+
882926
update-manticoresearch-deps:
883927
needs:
884928
- pack
@@ -890,4 +934,4 @@ jobs:
890934
with:
891935
name: executor
892936
version: "${{ needs.pack.outputs.version_full }}"
893-
token: ${{ secrets.PR_TOKEN }}
937+
token: ${{ secrets.PR_TOKEN }}

Dockerfile-dist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM ubuntu:22.04
2+
ARG TARGETARCH
3+
COPY manticore-executor-${TARGETARCH} /usr/bin/manticore-executor
4+
ENTRYPOINT ["/usr/bin/manticore-executor"]

0 commit comments

Comments
 (0)