build: 支持arm镜像 #134
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Docker Image | |
on: | |
push: | |
branches: | |
- dev | |
# jobs: | |
# github: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v1 | |
# - name: Login to github registry | |
# uses: actions-hub/docker/login@master | |
# env: | |
# DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
# DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
# - name: Build :latest | |
# if: success() | |
# run: docker buildx --platform linux/amd64,linux/arm64 -t weaigc/bingo:latest . | |
# - name: Push to docker hub :latest | |
# if: success() | |
# uses: actions-hub/docker@master | |
# with: | |
# args: push weaigc/bingo:latest | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v3 | |
- name: Use Node.js 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- run: | | |
npm install | |
npm run build | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- | |
name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- | |
name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: weaigc/bingo:latest |