mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-26 08:18:18 +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:
+11
-17
@@ -242,7 +242,7 @@ jobs:
|
||||
cargo install cross --git https://github.com/cross-rs/cross
|
||||
cross build --release --target ${{ matrix.target }} -p rustfs --bins
|
||||
else
|
||||
# Use zigbuild for Linux ARM64
|
||||
# Use zigbuild for other cross-compilation
|
||||
cargo zigbuild --release --target ${{ matrix.target }} -p rustfs --bins
|
||||
fi
|
||||
else
|
||||
@@ -456,6 +456,13 @@ jobs:
|
||||
echo "🔢 Version: $VERSION"
|
||||
echo ""
|
||||
|
||||
# Check build status
|
||||
BUILD_STATUS="${{ needs.build-rustfs.result }}"
|
||||
|
||||
echo "📊 Build Results:"
|
||||
echo " 📦 All platforms: $BUILD_STATUS"
|
||||
echo ""
|
||||
|
||||
case "$BUILD_TYPE" in
|
||||
"development")
|
||||
echo "🛠️ Development build artifacts have been uploaded to OSS dev directory"
|
||||
@@ -477,21 +484,8 @@ jobs:
|
||||
echo "🐳 Docker Images:"
|
||||
if [[ "${{ github.event.inputs.build_docker }}" == "false" ]]; then
|
||||
echo "⏭️ Docker image build was skipped (binary only build)"
|
||||
elif [[ "$BUILD_STATUS" == "success" ]]; then
|
||||
echo "🔄 Docker images will be built and pushed automatically via workflow_run event"
|
||||
else
|
||||
echo "🔄 Docker images will be built and pushed automatically using the binary artifacts"
|
||||
echo "❌ Docker image build will be skipped due to build failure"
|
||||
fi
|
||||
|
||||
# Call Docker workflow after successful build
|
||||
call-docker-build:
|
||||
name: Build And Push Docker Images
|
||||
needs: [build-check, build-rustfs]
|
||||
if: needs.build-check.outputs.should_build == 'true' && github.event.inputs.build_docker != 'false'
|
||||
uses: ./.github/workflows/docker.yml
|
||||
with:
|
||||
build_type: ${{ needs.build-check.outputs.build_type }}
|
||||
version: ${{ needs.build-check.outputs.version }}
|
||||
short_sha: ${{ needs.build-check.outputs.short_sha }}
|
||||
is_prerelease: ${{ needs.build-check.outputs.is_prerelease }}
|
||||
push_images: true
|
||||
force_rebuild: false
|
||||
secrets: inherit
|
||||
|
||||
Reference in New Issue
Block a user