up build docker

This commit is contained in:
ljw
2024-09-27 17:49:17 +08:00
parent 74662ae58b
commit 87bec98a7f
2 changed files with 5 additions and 4 deletions

View File

@@ -7,6 +7,8 @@ on:
- 'v*.*.*' # 当推送带有版本号的 tag例如 v1.0.0)时触发工作流 - 'v*.*.*' # 当推送带有版本号的 tag例如 v1.0.0)时触发工作流
- 'test*' - 'test*'
env:
LATEST_TAG: latest
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -93,6 +95,8 @@ jobs:
${{ matrix.job.goos}}-${{ matrix.job.platform }}.zip ${{ matrix.job.goos}}-${{ matrix.job.platform }}.zip
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# docker build and push of single-arch images
docker: docker:
name: Push Docker Image ${{ matrix.job.platform }} name: Push Docker Image ${{ matrix.job.platform }}
needs: build needs: build
@@ -146,10 +150,8 @@ jobs:
file: ./Dockerfile file: ./Dockerfile
platforms: ${{ matrix.job.docker_platform }} platforms: ${{ matrix.job.docker_platform }}
push: true push: true
build-args: |
ARCH=${{ matrix.job.docker_platform }}
tags: | tags: |
lejianwen/rustdesk-api:latest-${{ matrix.job.platform }} lejianwen/rustdesk-api:${{ env.LATEST_TAG }}-${{ matrix.job.platform }}
lejianwen/rustdesk-api:${{ env.TAG }}-${{ matrix.job.platform }} lejianwen/rustdesk-api:${{ env.TAG }}-${{ matrix.job.platform }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}

View File

@@ -1,6 +1,5 @@
FROM alpine FROM alpine
ARG ARCH
WORKDIR /app WORKDIR /app
RUN apk add --no-cache tzdata RUN apk add --no-cache tzdata
COPY ./release /app/ COPY ./release /app/