@ -13,12 +13,15 @@ on:
default : all
options:
- all
- dev
- normal
- large_disk
- full
- large_disk_full
- rocksdb
release_tag:
description : 'Release tag to publish (e.g. 3.93)'
required : true
default : ''
rocksdb_version:
description : 'RocksDB git tag to use when variant=rocksdb'
required : false
@ -27,71 +30,15 @@ on:
permissions:
contents : read
env:
RELEASE_TAG : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.release_tag || github.ref_name }}
# Limit concurrent builds to avoid rate limits
concurrency:
group : release-${{ github.ref }}
cancel-in-progress : false
jobs:
build-dev-on-demand:
runs-on : ubuntu-latest
if : github.event_name == 'workflow_dispatch' && github.event.inputs.variant == 'dev'
steps:
- name : Checkout
uses : actions/checkout@v6
- name : Docker meta
id : docker_meta
uses : docker/metadata-action@v5
with:
images : |
chrislusf/seaweedfs
ghcr.io/chrislusf/seaweedfs
tags : |
type=raw,value=dev
labels : |
org.opencontainers.image.title=seaweedfs
org.opencontainers.image.description=SeaweedFS is a distributed storage system for blobs, objects, files, and data lake, to store and serve billions of files fast!
org.opencontainers.image.vendor=Chris Lu
- name : Set up QEMU
uses : docker/setup-qemu-action@v3
- name : Create BuildKit config
run : |
cat > /tmp/buildkitd.toml <<EOF
[ registry."docker.io"]
mirrors = ["https://mirror.gcr.io"]
EOF
- name : Set up Docker Buildx
uses : docker/setup-buildx-action@v3
with:
buildkitd-config : /tmp/buildkitd.toml
- name : Login to Docker Hub
uses : docker/login-action@v3
with:
username : ${{ secrets.DOCKER_USERNAME }}
password : ${{ secrets.DOCKER_PASSWORD }}
- name : Login to GHCR
uses : docker/login-action@v3
with:
registry : ghcr.io
username : ${{ secrets.GHCR_USERNAME }}
password : ${{ secrets.GHCR_TOKEN }}
- name : Build and push dev
uses : docker/build-push-action@v6
with:
context : ./docker
push : true
file : ./docker/Dockerfile.go_build
platforms : linux/amd64,linux/arm64
tags : ${{ steps.docker_meta.outputs.tags }}
labels : ${{ steps.docker_meta.outputs.labels }}
build:
runs-on : ubuntu-latest
if : |
@ -162,7 +109,7 @@ jobs:
images : |
chrislusf/seaweedfs
ghcr.io/chrislusf/seaweedfs
tags : type=ref,event=tag,suffix= ${{ matrix.tag_suffix }}
tags : type=raw,value=${{ env.RELEASE_TAG }} ${{ matrix.tag_suffix }}
flavor : latest=false
labels : |
org.opencontainers.image.title=seaweedfs
@ -211,7 +158,7 @@ jobs:
platforms : ${{ matrix.platforms }}
# Push to GHCR to avoid Docker Hub rate limits on pulls
tags : |
ghcr.io/chrislusf/seaweedfs:${{ github.ref_name }}${{ matrix.tag_suffix }}
ghcr.io/chrislusf/seaweedfs:${{ env.RELEASE_TAG }}${{ matrix.tag_suffix }}
labels : ${{ steps.docker_meta.outputs.labels }}
cache-from : type=gha,scope=${{ matrix.variant }}
cache-to : type=gha,mode=max,scope=${{ matrix.variant }}
@ -306,8 +253,8 @@ jobs:
# This is much more efficient than pulling/pushing individual arch images
echo "Copying ${{ matrix.variant }} from GHCR to Docker Hub..."
retry_with_backoff crane copy \
ghcr.io/chrislusf/seaweedfs:${{ github.ref_name }}${{ matrix.tag_suffix }} \
chrislusf/seaweedfs:${{ github.ref_name }}${{ matrix.tag_suffix }}
ghcr.io/chrislusf/seaweedfs:${{ env.RELEASE_TAG }}${{ matrix.tag_suffix }} \
chrislusf/seaweedfs:${{ env.RELEASE_TAG }}${{ matrix.tag_suffix }}
echo "✓ Successfully copied ${{ matrix.variant }} to Docker Hub"
@ -328,4 +275,3 @@ jobs:
target_dir : helm
branch : gh-pages
helm_version : "3.18.4"