39 lines
931 B
Plaintext
39 lines
931 B
Plaintext
name: Build Image
|
|
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
release_tag:
|
|
description: 'Tag for the images'
|
|
required: true
|
|
|
|
env:
|
|
REGISTRY: registry.cn-hongkong.aliyuncs.com
|
|
NAMESPACE: chatwithpaper
|
|
IMAGE: academic
|
|
TAG: ${{ github.event.inputs.release_tag || github.event.client_payload.release_tag }}
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
environment: production
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Login to Registry
|
|
uses: docker/login-action@v2.1.0
|
|
with:
|
|
registry: "${{ env.REGISTRY }}"
|
|
username: "${{ secrets.ACR_USER }}"
|
|
password: "${{ secrets.ACR_PASSWORD }}"
|
|
|
|
- name: Build and push image
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
context: .
|
|
file: docs/Dockerfile+NoLocal+Latex
|
|
tags: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE }}:${{ env.TAG }}
|
|
push: true
|