ci: 移除ARM64平台支持并简化构建步骤 #52
This file contains hidden or 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: Docker Image CI | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Setup Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: aidotnet | |
| password: ${{ secrets.DOCKER }} | |
| - name: Extract short sha | |
| id: vars | |
| run: echo "sha=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT | |
| - name: Build and push multi-arch | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: src/FastGateway/Dockerfile | |
| platforms: linux/amd64 | |
| push: true | |
| tags: | | |
| aidotnet/fast-gateway:latest | |
| aidotnet/fast-gateway:sha-${{ steps.vars.outputs.sha }} |