mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-17 01:30:33 +00:00
feat: Implement precise Docker build triggering using workflow_run event (#233)
* fix: correct YAML indentation error in docker workflow - Fix incorrect indentation at line 237 in .github/workflows/docker.yml - Step 'Extract metadata and generate tags' had 12 spaces instead of 6 - This was causing YAML syntax validation to fail * fix: restore unified build-rustfs task with correct YAML syntax - Revert complex job separation back to single build-rustfs task - Maintain Linux and macOS builds in unified matrix - Fix YAML indentation and syntax issues - Docker builds will use only Linux binaries as designed in Dockerfile * feat: implement precise Docker build triggering using workflow_run - Use workflow_run event to trigger Docker builds independently - Add precise Linux build status checking via GitHub API - Only trigger Docker builds when both Linux architectures succeed - Remove coupling between build.yml and docker.yml workflows - Improve TARGETPLATFORM consistency in Dockerfile This resolves the issue where Docker builds would trigger even if Linux ARM64 builds failed, causing missing binary artifacts during multi-architecture Docker image creation.
This commit is contained in:
15
Dockerfile
15
Dockerfile
@@ -1,8 +1,9 @@
|
||||
# Multi-stage build for RustFS production image
|
||||
FROM alpine:latest AS build
|
||||
|
||||
# Build arguments
|
||||
ARG TARGETARCH
|
||||
# Build arguments - use TARGETPLATFORM for consistency with Dockerfile.source
|
||||
ARG TARGETPLATFORM
|
||||
ARG BUILDPLATFORM
|
||||
ARG RELEASE=latest
|
||||
ARG CHANNEL=release
|
||||
|
||||
@@ -18,11 +19,11 @@ RUN apk add --no-cache \
|
||||
# Create build directory
|
||||
WORKDIR /build
|
||||
|
||||
# Map TARGETARCH to architecture format used in builds
|
||||
RUN case "${TARGETARCH}" in \
|
||||
"amd64") ARCH="x86_64" ;; \
|
||||
"arm64") ARCH="aarch64" ;; \
|
||||
*) echo "Unsupported architecture: ${TARGETARCH}" && exit 1 ;; \
|
||||
# Map TARGETPLATFORM to architecture format used in builds
|
||||
RUN case "${TARGETPLATFORM}" in \
|
||||
"linux/amd64") ARCH="x86_64" ;; \
|
||||
"linux/arm64") ARCH="aarch64" ;; \
|
||||
*) echo "Unsupported platform: ${TARGETPLATFORM}" && exit 1 ;; \
|
||||
esac && \
|
||||
echo "ARCH=${ARCH}" > /build/arch.env
|
||||
|
||||
|
||||
Reference in New Issue
Block a user