feat: support arm64 in stable image

This commit is contained in:
Zhang Minghan 2024-01-25 16:14:12 +08:00
parent c4d330947d
commit a72ea845b2
2 changed files with 11 additions and 5 deletions

View File

@ -19,8 +19,14 @@ jobs:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build the Docker image
run: docker build . --file Dockerfile --tag programzmh/chatnio:stable
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Push to DockerHub
run: docker push programzmh/chatnio:stable
- name: Build and push Docker images
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: programzmh/chatnio:stable

View File

@ -167,7 +167,7 @@ func ExtractUrls(data string) []string {
func ExtractImageUrls(data string) []string {
// https://platform.openai.com/docs/guides/vision/what-type-of-files-can-i-upload
re := regexp.MustCompile(`(https?://\S+\.(?:png|jpg|jpeg|gif|webp|heif|heic))`)
re := regexp.MustCompile(`(https?://\S+\.(?:png|jpg|jpeg|gif|webp|heif|heic)(?:\s\S+)?)`)
return re.FindAllString(strings.ToLower(data), -1)
}