Skip to content

Create and publish frontend image #5

Create and publish frontend image

Create and publish frontend image #5

name: Create and publish frontend image
on:
release:
types: [published]
workflow_dispatch:
inputs:
tags:
description: 'Docker image tag (e.g: v0.0.1)'
required: false
type: string
env:
IMAGE_NAME: cohere-toolkit-frontend
jobs:
build-and-push-frontend-image:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_SA_KEY }}'
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v1
with:
project_id: ${{ env.GCP_PROJECT_ID }}
- name: Authenticate Docker to Artifact Registry
run: gcloud auth configure-docker ${{ vars.REGISTRY }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ vars.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: ./src/interfaces/coral_web
tags: ${{ env.IMAGE_NAME }}
push: true