Skip to content

Merge pull request #158 from Azure-Samples/gk/chat-copilot-update #38

Merge pull request #158 from Azure-Samples/gk/chat-copilot-update

Merge pull request #158 from Azure-Samples/gk/chat-copilot-update #38

name: Frontend Build and Push to GHCR
on:
push:
branches:
- main
paths:
- 'ui/typescript/**'
workflow_dispatch:
env:
REGISTRY: ghcr.io
REPOSITORY: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set short_sha
id: vars
run: echo "short_sha=$(git rev-parse --short HEAD)" >> ${GITHUB_ENV}
- name: Login to GHCR
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: downcase env.REPOSITORY
run: |
echo "REPOSITORY=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: ui/typescript
push: true
tags: ${{ env.REGISTRY }}/${{ env.REPOSITORY }}/frontend-service:${{ env.short_sha }}