This repository was archived by the owner on Jul 23, 2025. It is now read-only.
Daily Docker AIO Build #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Docker AIO Image | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - 'v*' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| ORG_NAME: openlistteam | |
| IMAGE_NAME: openlist | |
| REGISTRY: ghcr.io | |
| 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' | |
| IMAGE_PUSH: ${{ github.event_name == 'push' }} | |
| IMAGE_IS_PROD: ${{ github.ref_type == 'tag' }} | |
| jobs: | |
| build_binary: | |
| name: Build Binaries | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 'stable' | |
| - name: Cache Musl libraries | |
| id: cache-musl | |
| uses: actions/cache@v4 | |
| with: | |
| path: build/musl-libs | |
| key: docker-musl-libs-v2 | |
| - name: Download Musl (if not cached) | |
| if: steps.cache-musl.outputs.cache-hit != 'true' | |
| run: bash build.sh prepare docker-multiplatform | |
| - name: Build Beta Binary | |
| if: env.IMAGE_IS_PROD != 'true' | |
| run: bash build.sh beta docker-multiplatform | |
| - name: Build Release Binary | |
| if: env.IMAGE_IS_PROD == 'true' | |
| run: bash build.sh release docker-multiplatform | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.ARTIFACT_NAME }} | |
| path: | | |
| build/ | |
| !build/*.tgz | |
| !build/musl-libs/** | |
| build_and_push_aio: | |
| needs: build_binary | |
| name: Build and Push AIO Image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download Binaries | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ env.ARTIFACT_NAME }} | |
| path: build/ | |
| - name: Setup QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Setup Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GHCR | |
| if: env.IMAGE_PUSH == 'true' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Generate Docker Tags | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.ORG_NAME }}/${{ env.IMAGE_NAME }} | |
| tags: | | |
| type=ref,event=tag | |
| type=raw,value=latest,enable=${{ env.IMAGE_IS_PROD == 'true' }} | |
| type=raw,value=beta,enable=${{ env.IMAGE_IS_PROD != 'true' }} | |
| flavor: | | |
| suffix=-aio | |
| - name: Build and Push AIO Image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: Dockerfile.ci | |
| push: ${{ env.IMAGE_PUSH == 'true' }} | |
| build-args: | | |
| INSTALL_FFMPEG=true | |
| INSTALL_ARIA2=true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| platforms: ${{ env.RELEASE_PLATFORMS }} |