Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

fix(ci): check inputs.version first in all PyPI workflows (#775)

Francesco Bonaccib48a69678c5d
diff --git a/.github/workflows/cd-py-core.yml b/.github/workflows/cd-py-core.yml
index e1d4c37ee3..7a65421c0e 100644
--- a/.github/workflows/cd-py-core.yml
+++ b/.github/workflows/cd-py-core.yml
@@ -32,7 +32,10 @@ jobs:
- name: Determine version
id: get-version
run: |
- if [ "${{ github.event_name }}" == "push" ]; then
+ # Check inputs.version first (set by workflow_call)
+ if [ -n "${{ inputs.version }}" ]; then
+ VERSION=${{ inputs.version }}
+ elif [ "${{ github.event_name }}" == "push" ]; then
# Extract version from tag (for package-specific tags)
if [[ "${{ github.ref }}" =~ ^refs/tags/core-v([0-9]+\.[0-9]+\.[0-9]+) ]]; then
VERSION=${BASH_REMATCH[1]}
@@ -44,8 +47,8 @@ jobs:
# Use version from workflow dispatch
VERSION=${{ github.event.inputs.version }}
else
- # Use version from workflow_call
- VERSION=${{ inputs.version }}
+ echo "No version provided"
+ exit 1
fi
echo "VERSION=$VERSION"
echo "version=$VERSION" >> $GITHUB_OUTPUT
diff --git a/.github/workflows/cd-py-mcp-server.yml b/.github/workflows/cd-py-mcp-server.yml
index 60979de5bc..33d9a19c5e 100644
--- a/.github/workflows/cd-py-mcp-server.yml
+++ b/.github/workflows/cd-py-mcp-server.yml
@@ -38,7 +38,10 @@ jobs:
- name: Determine version
id: get-version
run: |
- if [ "${{ github.event_name }}" == "push" ]; then
+ # Check inputs.version first (set by workflow_call)
+ if [ -n "${{ inputs.version }}" ]; then
+ VERSION=${{ inputs.version }}
+ elif [ "${{ github.event_name }}" == "push" ]; then
# Extract version from tag (for package-specific tags)
if [[ "${{ github.ref }}" =~ ^refs/tags/mcp-server-v([0-9]+\.[0-9]+\.[0-9]+) ]]; then
VERSION=${BASH_REMATCH[1]}
@@ -50,8 +53,8 @@ jobs:
# Use version from workflow dispatch
VERSION=${{ github.event.inputs.version }}
else
- # Use version from workflow_call
- VERSION=${{ inputs.version }}
+ echo "No version provided"
+ exit 1
fi
echo "VERSION=$VERSION"
echo "version=$VERSION" >> $GITHUB_OUTPUT
diff --git a/.github/workflows/cd-py-som.yml b/.github/workflows/cd-py-som.yml
index 890da6d42e..f838ceb928 100644
--- a/.github/workflows/cd-py-som.yml
+++ b/.github/workflows/cd-py-som.yml
@@ -36,7 +36,10 @@ jobs:
- name: Determine version
id: get-version
run: |
- if [ "${{ github.event_name }}" == "push" ]; then
+ # Check inputs.version first (set by workflow_call)
+ if [ -n "${{ inputs.version }}" ]; then
+ VERSION=${{ inputs.version }}
+ elif [ "${{ github.event_name }}" == "push" ]; then
# Extract version from tag (for package-specific tags)
if [[ "${{ github.ref }}" =~ ^refs/tags/som-v([0-9]+\.[0-9]+\.[0-9]+) ]]; then
VERSION=${BASH_REMATCH[1]}
@@ -48,8 +51,8 @@ jobs:
# Use version from workflow dispatch
VERSION=${{ github.event.inputs.version }}
else
- # Use version from workflow_call
- VERSION=${{ inputs.version }}
+ echo "No version provided"
+ exit 1
fi
echo "VERSION=$VERSION"
echo "version=$VERSION" >> $GITHUB_OUTPUT