mirror of
https://github.com/AlistGo/alist.git
synced 2025-04-25 06:44:03 +08:00
Update release_docker.yml
This commit is contained in:
parent
57069a840c
commit
2e16134ca0
37
.github/workflows/release_docker.yml
vendored
37
.github/workflows/release_docker.yml
vendored
@ -1,17 +1,19 @@
|
|||||||
name: release_docker
|
name: release_docker
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_dispatch:
|
||||||
tags:
|
inputs:
|
||||||
- 'v*'
|
release_type:
|
||||||
branches:
|
description: 'Release type (beta or release)'
|
||||||
- main
|
required: true
|
||||||
pull_request:
|
default: 'beta'
|
||||||
branches:
|
type: choice
|
||||||
- main
|
options:
|
||||||
|
- beta
|
||||||
|
- release
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
group: ${{ github.workflow }}-${{ github.run_id }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
@ -20,14 +22,10 @@ env:
|
|||||||
REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
|
REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
ARTIFACT_NAME: 'binaries_docker_release'
|
ARTIFACT_NAME: 'binaries_docker_release'
|
||||||
RELEASE_PLATFORMS: 'linux/amd64,linux/arm64,linux/arm/v7,linux/386,linux/arm/v6,linux/s390x,linux/ppc64le,linux/riscv64'
|
RELEASE_PLATFORMS: 'linux/amd64,linux/arm64,linux/arm/v7,linux/386,linux/arm/v6,linux/s390x,linux/ppc64le,linux/riscv64'
|
||||||
IMAGE_PUSH: ${{ github.event_name == 'push' }}
|
IMAGE_PUSH: true
|
||||||
IMAGE_IS_PROD: ${{ github.ref_type == 'tag' }}
|
IMAGE_IS_PROD: ${{ github.event.inputs.release_type == 'release' }}
|
||||||
IMAGE_TAGS_BETA: |
|
IMAGE_TAGS_BETA: |
|
||||||
type=schedule
|
type=raw,value=beta
|
||||||
type=ref,event=branch
|
|
||||||
type=ref,event=tag
|
|
||||||
type=ref,event=pr
|
|
||||||
type=raw,value=beta,enable={{is_default_branch}}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_binary:
|
build_binary:
|
||||||
@ -53,11 +51,11 @@ jobs:
|
|||||||
run: bash build.sh prepare docker-multiplatform
|
run: bash build.sh prepare docker-multiplatform
|
||||||
|
|
||||||
- name: Build go binary (beta)
|
- name: Build go binary (beta)
|
||||||
if: env.IMAGE_IS_PROD != 'true'
|
if: github.event.inputs.release_type == 'beta'
|
||||||
run: bash build.sh beta docker-multiplatform
|
run: bash build.sh beta docker-multiplatform
|
||||||
|
|
||||||
- name: Build go binary (release)
|
- name: Build go binary (release)
|
||||||
if: env.IMAGE_IS_PROD == 'true'
|
if: github.event.inputs.release_type == 'release'
|
||||||
run: bash build.sh release docker-multiplatform
|
run: bash build.sh release docker-multiplatform
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
@ -107,7 +105,6 @@ jobs:
|
|||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
if: env.IMAGE_PUSH == 'true'
|
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
logout: true
|
logout: true
|
||||||
@ -130,7 +127,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: Dockerfile.ci
|
file: Dockerfile.ci
|
||||||
push: ${{ env.IMAGE_PUSH == 'true' }}
|
push: true
|
||||||
build-args: ${{ matrix.build_arg }}
|
build-args: ${{ matrix.build_arg }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user