Update maven.yml

This commit is contained in:
jack ning
2024-11-25 10:14:47 +08:00
parent c90d60d818
commit b87e2283ca

View File

@@ -50,23 +50,31 @@ jobs:
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: image=moby/buildkit:latest
- name: Create and use a new builder
run: |
docker buildx create --use --name mybuilder
docker buildx inspect mybuilder --bootstrap
# https://github.com/docker/build-push-action
- name: push the docker image to docker hub
uses: docker/build-push-action@v6
with:
context: .
# dockerfile: Dockerfile
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/bytedesk:latest
platforms: linux/amd64,linux/arm64,linux/arm/v7,windows/amd64,windows/arm64,macos/amd64,macos/arm64
# https://github.com/actions/upload-artifact
# https://github.com/actions/download-artifact
# - name: Upload artifact
# uses: actions/upload-artifact@v4
# with:
# name: my-artifact
# path: path/to/artifact/
# # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
# - name: Update dependency graph
# uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
# 登录阿里云 Docker
- name: login to aliyun docker
run: echo ${{ secrets.ALIYUN_DOCKER_PASSWORD }} | docker login --username ${{ secrets.ALIYUN_DOCKER_USERNAME }} --password-stdin registry.cn-hangzhou.aliyuncs.com
# 构建并推送 Docker 镜像到阿里云
- name: Build and push Docker image to Aliyun
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: registry.cn-hangzhou.aliyuncs.com/weiyuai/bytedesk:latest
platforms: linux/amd64,linux/arm64,linux/arm/v7,windows/amd64,windows/arm64,macos/amd64,macos/arm64