Skip to content

Commit

Permalink
feat: support arm64 in stable image
Browse files Browse the repository at this point in the history
  • Loading branch information
zmh-program committed Jan 25, 2024
1 parent c4d3309 commit a72ea84
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/docker-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion utils/char.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit a72ea84

Please sign in to comment.