From 4201501c9a9ff81eb3d854964294a5b0a096055a Mon Sep 17 00:00:00 2001 From: Abhradeep Chakraborty Date: Mon, 28 Apr 2025 12:08:42 +0530 Subject: [PATCH] feat(github-workflow): upload dev binaries to gcs artifact bucket Signed-off-by: Abhradeep Chakraborty --- .github/workflows/docker-dev-release.yml | 30 ++++++++++++++++++++++++ helio | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-dev-release.yml b/.github/workflows/docker-dev-release.yml index 9d00f85bb..213e7ed60 100644 --- a/.github/workflows/docker-dev-release.yml +++ b/.github/workflows/docker-dev-release.yml @@ -98,6 +98,36 @@ jobs: docker stop $(docker ps -q --filter ancestor=${image_tag}) done + - name: Extract and Upload Binaries + if: matrix.flavor == 'ubuntu' # Only run once per flavor + run: | + # Get the image tag + image_tags=(${{ steps.metadata.outputs.tags }}) + image_tag=${image_tags[0]} + + # Extract version from the image + echo "Extracting version from image..." + VERSION=$(docker run --rm ${image_tag} dragonfly --version | head -n1 | cut -d' ' -f2) + echo "Dragonfly version: $VERSION" + + echo "Extracting binary from ${image_tag} for ${{ matrix.os.arch }}" + + # Create a temporary container and copy the binary + container_id=$(docker create ${image_tag}) + docker cp ${container_id}:/usr/local/bin/dragonfly ./dragonfly + docker rm ${container_id} + + # Create a tar archive + tar_name="dragonfly-${{ matrix.os.arch }}-dbgsym.tar.gz" + tar czf ${tar_name} dragonfly + + # Upload to GCS + echo "Uploading ${tar_name} to GCS" + gcloud storage cp ${tar_name} gs://${{ secrets.ARTIFACT_BUCKET }}/dragonfly/$VERSION --recursive + + # Cleanup + rm -f dragonfly ${tar_name} + outputs: # matrix jobs outputs override each other, but we use the same sha # for all images, so we can use the same output name. diff --git a/helio b/helio index e1e3934b6..875cedd2a 160000 --- a/helio +++ b/helio @@ -1 +1 @@ -Subproject commit e1e3934b656a258c58125c18c7524dd6438c5585 +Subproject commit 875cedd2a0cd084fd15a3d5dbfe20150e19ffcef