This is an automated email from the ASF dual-hosted git repository.

piotr pushed a commit to branch release/server-0.4.300
in repository https://gitbox.apache.org/repos/asf/iggy.git

commit c2421d85e747e734343c51a711b6b61ce0f27d71
Author: Piotr Gankiewicz <[email protected]>
AuthorDate: Wed Apr 16 20:29:46 2025 +0200

    fix(ci): fix publish server script tag validation (#1692)
---
 .github/workflows/publish_server.yml | 18 +++++++++++++-----
 .github/workflows/release_cli.yml    |  2 +-
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/publish_server.yml 
b/.github/workflows/publish_server.yml
index 26be9cdb..a9675838 100644
--- a/.github/workflows/publish_server.yml
+++ b/.github/workflows/publish_server.yml
@@ -18,9 +18,11 @@
 name: publish_server
 
 on:
-  push:
-    tags:
-      - 'server-*'
+  workflow_dispatch:
+    inputs:
+      ref:
+        description: 'Git ref (branch, tag, or SHA) to build'
+        required: true
 
 env:
   DOCKERHUB_REGISTRY_NAME: apache/iggy
@@ -55,6 +57,7 @@ jobs:
       - name: Checkout code
         uses: actions/checkout@v4
         with:
+          ref: ${{ inputs.ref }}
           fetch-depth: 0
 
       - name: Extract tag name
@@ -74,7 +77,7 @@ jobs:
       - name: Check if version from Cargo.toml is the same as the tag
         id: check_git_tag
         run: |
-          if [[ "iggy-${{ steps.extract_version.outputs.server_version }}" == 
"${{ steps.extract_tag.outputs.tag_name }}" ]];
+          if [[ "server-${{ steps.extract_version.outputs.server_version }}" 
== "${{ steps.extract_tag.outputs.tag_name }}" ]];
           then
             echo "::notice ::Tag ${{ steps.extract_tag.outputs.tag_name }} 
matches the version in Cargo.toml"
             echo "tag_matches=true" >> "$GITHUB_OUTPUT"
@@ -85,7 +88,7 @@ jobs:
 
     outputs:
       server_version: ${{ steps.extract_version.outputs.server_version }}
-      tag_created: ${{ steps.tagging.outputs.tag_created }}
+      tag_created: ${{ steps.check_git_tag.outputs.tag_matches }}
 
   release_and_publish:
     name: build release ${{ matrix.platform.os_name }}
@@ -121,6 +124,8 @@ jobs:
     steps:
       - name: Checkout code
         uses: actions/checkout@v4
+        with:
+          ref: ${{ inputs.ref }}
 
       - name: Cache cargo & target directories
         uses: Swatinem/rust-cache@v2
@@ -255,6 +260,7 @@ jobs:
             $(printf '${{ env.DOCKERHUB_REGISTRY_NAME }}@sha256:%s ' *)
 
       - name: Inspect image
+        continue-on-error: true
         run: |
           docker buildx imagetools inspect ${{ env.DOCKERHUB_REGISTRY_NAME 
}}:latest
 
@@ -275,6 +281,8 @@ jobs:
     steps:
       - name: Checkout code
         uses: actions/checkout@v4
+        with:
+          ref: ${{ inputs.ref }}
 
       - name: Everything is fine
         if: ${{ !(contains(needs.*.result, 'failure')) }}
diff --git a/.github/workflows/release_cli.yml 
b/.github/workflows/release_cli.yml
index dace1705..0bd20285 100644
--- a/.github/workflows/release_cli.yml
+++ b/.github/workflows/release_cli.yml
@@ -91,7 +91,7 @@ jobs:
           tool: cross
 
       - name: Build ${{ matrix.platform.target }} release binary
-        run: cross +stable build --verbose --release --target ${{ 
matrix.platform.target }}
+        run: cross +stable build --verbose --release --target ${{ 
matrix.platform.target }} -p iggy
 
       - name: Collect ${{ matrix.platform.target }} executable
         run: |

Reply via email to