Skip to content

Update Readme.md

Update Readme.md #104

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
env:
BUILD_BRANCH: ${{ github.ref_name }}
BUILD_COMMIT: ${{ github.sha }}
PROJECT_ID: "deeplearning-sahil"
LOCATION: "us"
REPOSITORY: sahil-experiment-docker-images
IMAGE_NAME: ml-pipelines-kfp-image
FASTAPI_IMAGE_NAME: fastapi-ml-generic
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
- name: Configure Docker for Artifact Registry
run: |
gcloud auth configure-docker ${{ env.LOCATION }}-docker.pkg.dev
- name: Build ml_pipeline_kfp_image
run: |
docker build \
--build-arg BUILD_BRANCH=${{ env.BUILD_BRANCH }} \
--build-arg BUILD_COMMIT=${{ env.BUILD_COMMIT }} \
--tag ${{ env.LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} \
--file Dockerfile .
- name: Push ml_pipeline_kfp_image
run: |
docker push ${{ env.LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
- name: Build FastAPI inference image
run: |
docker build \
--build-arg BUILD_BRANCH=${{ env.BUILD_BRANCH }} \
--build-arg BUILD_COMMIT=${{ env.BUILD_COMMIT }} \
--tag ${{ env.LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.FASTAPI_IMAGE_NAME }}:${{ github.ref_name }} \
--tag ${{ env.LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.FASTAPI_IMAGE_NAME }}:latest \
--file src/ml_pipelines_kfp/iris_xgboost/pipelines/components/fastapi/Dockerfile.fastapi \
src/ml_pipelines_kfp/iris_xgboost/pipelines/components/fastapi/
- name: Push FastAPI inference image
run: |
docker push ${{ env.LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.FASTAPI_IMAGE_NAME }}:${{ github.ref_name }}
docker push ${{ env.LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.FASTAPI_IMAGE_NAME }}:latest