Create build-image
This commit is contained in:
38
.github/workflows/build-image
vendored
Normal file
38
.github/workflows/build-image
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
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
|
||||
Reference in New Issue
Block a user