Skip to content

added aihub

added aihub #17

Workflow file for this run

# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: build
on:
push:
branches:
- main
- aihub
tags:
- v*
pull_request:
branches:
- main
workflow_dispatch:
env:
REGISTRY: ghcr.io
DOCS_IMAGE_NAME: aihub-prepdocs
CHAT_IMAGE_NAME: aihub-chat
AIHUB_IMAGE_NAME: aihub
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.x'
include-prerelease: true
- name: Setup MinVer
run: |
dotnet tool install --global minver-cli --version 4.3.0
- name: Calculate Version
run: |
echo "MINVERVERSIONOVERRIDE=$($HOME/.dotnet/tools/minver -t v. -m 1.0 -d preview)" >> $GITHUB_ENV
- name: Lower case REPO
run: |
echo "GITHUB_REPOSITORY_LOWER_CASE=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV}
- name: Login to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata (tags, labels) for prep-docs Docker
id: meta-docs
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.DOCS_IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: ./scripts/
file: ./scripts/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.REGISTRY }}/${{ env.GITHUB_REPOSITORY_LOWER_CASE }}/${{ env.DOCS_IMAGE_NAME }}:${{ env.MINVERVERSIONOVERRIDE }}
labels: ${{ steps.meta-docs.outputs.labels }}
- name: Extract metadata (tags, labels) for chat Docker
id: meta-chat
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.CHAT_IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: ./azure-search-openai-demo/app
file: ./azure-search-openai-demo/app/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.REGISTRY }}/${{ env.GITHUB_REPOSITORY_LOWER_CASE }}/${{ env.CHAT_IMAGE_NAME }}:${{ env.MINVERVERSIONOVERRIDE }}
labels: ${{ steps.meta-chat.outputs.labels }}