Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcrt committed Apr 24, 2024
1 parent efad268 commit 1e7837d
Showing 1 changed file with 28 additions and 15 deletions.
43 changes: 28 additions & 15 deletions .github/workflows/build-push-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
service: [backend, frontend, radar, ml, lunary-ee]
service: [backend, frontend, radar]
steps:
- name: Check out the private Ops repo
uses: actions/checkout@v4
Expand Down Expand Up @@ -57,20 +57,6 @@ jobs:
needs: build-and-push
runs-on: ubuntu-latest
steps:
- name: Deploy ML to Production
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.ML_IP_ADDRESS }}
username: root
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.ML_PORT }}
script: |
docker pull lunary/ml:latest
if [ $(docker ps -aq -f name=ml) ]; then
docker rm -f ml
fi
docker run --rm -d -p 4242:4242 --name ml lunary/ml
- name: Deploy to Production
uses: appleboy/ssh-action@master
with:
Expand All @@ -84,3 +70,30 @@ jobs:
docker compose pull
docker compose down
docker compose up -d
build-lunary-ee:
runs-on: ubuntu-latest
steps:
- name: Check out the private Ops repo
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_ACCESS_TOKEN }}
submodules: "recursive"

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to private Docker Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}

- name: Build and push lunary-ee
uses: docker/build-push-action@v5
with:
context: .
file: ./ops/lunary-ee.Dockerfile
push: true
tags: lunary/lunary-ee:latest
platforms: linux/amd64,linux/arm64

0 comments on commit 1e7837d

Please sign in to comment.