Merge pull request #271 from tigergraph/GML-1866-entity-type-upserts #71
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CoPilot Build Nightly | |
on: | |
push: | |
branches: [ "dev" ] | |
workflow_dispatch: | |
env: | |
SHA: ${{ github.sha }} | |
jobs: | |
build-image: | |
runs-on: ubuntu-latest | |
outputs: | |
image: ${{steps.get-image.outputs.IMAGE}} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.PUBLIC_DOCKERHUB_USERNAME }} | |
password: ${{ secrets.PUBLIC_DOCKERHUB_TOKEN }} | |
- name: Get Image tag | |
id: get-image | |
run: | | |
IMAGE=tigergraphml/copilot:${SHA::6} | |
echo "IMAGE=$IMAGE" >> $GITHUB_ENV | |
echo "IMAGE=$IMAGE" >> $GITHUB_OUTPUT${{ needs.setup.outputs.image }} | |
- name: Build and push Docker image CoPilot | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./copilot/Dockerfile | |
push: true | |
tags: | | |
${{ env.IMAGE }} | |
tigergraphml/copilot:dev | |
- name: Build and push Docker image ECC | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./eventual-consistency-service/Dockerfile | |
push: true | |
tags: | | |
${{ env.IMAGE }} | |
tigergraphml/ecc:dev | |
- name: Build and push Docker image chat-history | |
uses: docker/build-push-action@v5 | |
with: | |
context: chat-history/ | |
file: ./chat-history/Dockerfile | |
push: true | |
tags: | | |
${{ env.IMAGE }} | |
tigergraphml/chat-history:dev | |
- name: Build and push Docker image copilot-ui | |
uses: docker/build-push-action@v5 | |
with: | |
context: copilot-ui/ | |
file: ./copilot-ui/Dockerfile | |
push: true | |
tags: | | |
${{ env.IMAGE }} | |
tigergraphml/copilot-ui:dev | |
- name: Set SSH key | |
run: | | |
mkdir -p ~/.ssh | |
echo "${{ secrets.PRIVATE_SSH_KEY }}" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
- name: Update on-prem dev environment | |
run: | | |
ssh -o StrictHostKeyChecking=no ${{ secrets.DEV_USERNAME }}@${{ secrets.DEV_ADDRESS }} << 'ENDSSH' | |
cd CoPilot | |
docker compose pull | |
docker compose up -d | |
ENDSSH |