[feat] 支持arm镜像构建

This commit is contained in:
Wizerd
2024-01-04 15:21:44 +08:00
parent e5300c7204
commit 7cbc1287dd

34
.github/workflows/docker-deploy.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
name: Docker Release
on:
release:
types: [created]
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Extract tag name
id: tag_name
run: echo "::set-output name=tag::${GITHUB_REF#refs/tags/}"
- name: Build and push Docker image with Release tag
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: |
yourusername/yourrepo:${{ steps.tag_name.outputs.tag }}
yourusername/yourrepo:latest