Skip to content

Build and Push Docker Arm64 Image #1

Build and Push Docker Arm64 Image

Build and Push Docker Arm64 Image #1

Workflow file for this run

name: Build and Push Docker Arm64 Image
on:
workflow_dispatch # 仅当手动触发工作流时触发
# push:
# tags:
# - 'v*.*.*' # 仅当推送标签(例如 v1.0.0)时触发
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Extract version from tag
id: vars
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Build and push Docker image
id: push
run: |
docker buildx create --use
docker buildx build --platform linux/arm64 \
-t lejianwen/rustdesk-api:${{ env.TAG }}-arm64 \
--push .