Skip to content

N2A - Build and Push #7

N2A - Build and Push

N2A - Build and Push #7

name: N2A - Build and Push
env:
# Azure ACR
ACR_HOST: ${{ vars.REGISTRY_LOGIN_SERVER_NONPROD }}
ACR_USER: ${{ secrets.REGISTRY_USERNAME_NONPROD }}
ACR_PASS: ${{ secrets.REGISTRY_PASSWORD_NONPROD }}
on:
workflow_dispatch:
#push:
# branches:
# - main
jobs:
build_and_push:
runs-on: [self-hosted, nonprod]
steps:
- uses: actions/checkout@v3
- name: log in to ACR
uses: azure/docker-login@v1
with:
login-server: ${{ env.ACR_HOST }}
username: ${{ env.ACR_USER }}
password: ${{ env.ACR_PASS }}
- name: build and push docker container
run: |
docker build . -t ${{ env.ACR_HOST }}/librechat:n2a.${{ github.sha }}
docker push ${{ env.ACR_HOST }}/librechat:n2a.${{ github.sha }}
docker build . -t ${{ env.ACR_HOST }}/librechat:n2a.latest
docker push ${{ env.ACR_HOST }}/librechat:n2a.latest
- name: create new revision and activate
uses: azure/CLI@v1
with:
inlineScript: |
az login --identity
az containerapp revision copy -n conplayaieastusn2a001 -g rg-playai-eastus-n2a-001 --image librechat:n2a.${{ github.sha }}