up build docker

This commit is contained in:
ljw
2024-09-27 14:18:36 +08:00
parent 871bb328f0
commit 47f1043cc2
2 changed files with 1 additions and 41 deletions

View File

@@ -5,6 +5,7 @@ on:
push:
tags:
- 'v*.*.*' # 当推送带有版本号的 tag例如 v1.0.0)时触发工作流
- 'test*' # 当推送带有版本号的 tag例如 v1.0.0-rc1时触发工作流
jobs:
build:

View File

@@ -1,41 +0,0 @@
name: Build and Push Docker Arm64 Image
on:
workflow_dispatch: # 手动触发工作流时触发
inputs:
tags:
description: 'Test scenario tags'
required: false
type: boolean
# 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:actiontest-arm64 \
--push . -f ./Dockerfile_arm64