feat: support multi-platforms(linux/amd64, linux/arm64)

(before only support linux/amd/64); refer to https://docs.docker.com/build/ci/github-actions/multi-platform/ ; style with `trunk: yamllink@1.35.1`
This commit is contained in:
changchiyou
2024-04-06 19:21:00 +08:00
parent 6cbb737073
commit 833a255612
+6 -9
View File
@@ -3,28 +3,25 @@ name: ci
on:
push:
branches:
- 'main'
- "main"
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Build and push
- name: Build and push
uses: docker/build-push-action@v5
with:
file: ./Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: pawanosman/chatgpt:latest