Skip to content

Merge pull request #180 from tigergraph/GML-1728-ci-changes #1

Merge pull request #180 from tigergraph/GML-1728-ci-changes

Merge pull request #180 from tigergraph/GML-1728-ci-changes #1

name: CoPilot Build Cloud
on:
push:
branches: [ "cloud-main" ]
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: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Get Image tag
id: get-image
run: |
IMAGE=tginternal/copilot:${SHA::6}
echo "IMAGE=$IMAGE" >> $GITHUB_ENV
echo "IMAGE=$IMAGE" >> $GITHUB_OUTPUT${{ needs.setup.outputs.image }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: |
${{ env.IMAGE }}
tginternal/copilot:cloud-latest