perf: make docker release 10 times faster (#5803)

* build: improve multistage docker build

* build: add dockerfile for ci

* build: add BuildDockerMultiplatform function in build.sh for ci

* ci: change build method

* build: add missing mod download command to the Dockerfile

* build: revert changes made ffmpeg installed

* build: use musl build for docker release

* ci: apply to dev version

* fix: don't login on pr

* fix: don't build_docker_with_aria2 on pr

---------

Co-authored-by: Andy Hsu <i@nn.ci>
This commit is contained in:
Mmx
2024-01-05 15:52:30 +08:00
committed by GitHub
parent 28bb3f6310
commit e6e2d03ba1
6 changed files with 113 additions and 13 deletions

View File

@ -13,6 +13,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: Build go binary
run: bash build.sh release docker-multiplatform
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
@ -36,6 +43,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.ci
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}