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(workflows): prevent ghost runs and handle existing tags (#758)

Francesco Bonaccic7fe463baee2
diff --git a/.github/workflows/docker-reusable-build.yml b/.github/workflows/docker-reusable-build.yml
index 989fad566b..09d395d1be 100644
--- a/.github/workflows/docker-reusable-build.yml
+++ b/.github/workflows/docker-reusable-build.yml
@@ -1,6 +1,7 @@
name: Reusable Docker Build Workflow
on:
+ workflow_dispatch: # Prevents phantom runs on push, allows manual testing
workflow_call:
inputs:
image_name:
diff --git a/.github/workflows/docker-reusable-publish.yml b/.github/workflows/docker-reusable-publish.yml
index ddc996d650..826f462ca8 100644
--- a/.github/workflows/docker-reusable-publish.yml
+++ b/.github/workflows/docker-reusable-publish.yml
@@ -1,6 +1,7 @@
name: Reusable Docker Publish Workflow
on:
+ workflow_dispatch: # Prevents phantom runs on push, allows manual testing
workflow_call:
inputs:
image_name:
diff --git a/.github/workflows/release-bump-version.yml b/.github/workflows/release-bump-version.yml
index 0a4be54c86..e55d69450d 100644
--- a/.github/workflows/release-bump-version.yml
+++ b/.github/workflows/release-bump-version.yml
@@ -158,6 +158,21 @@ jobs:
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
+ - name: Clean existing tag if present
+ run: |
+ cd ${{ steps.package.outputs.directory }}
+ # Get the new version that bump2version would create
+ NEW_VERSION=$(bump2version --dry-run --list ${{ inputs.bump_type }} 2>&1 | grep new_version | sed 's/new_version=//')
+ # Get tag name pattern from .bumpversion.cfg
+ TAG_NAME=$(grep 'tag_name' .bumpversion.cfg | sed 's/tag_name = //' | sed "s/{new_version}/$NEW_VERSION/")
+
+ echo "Checking for existing tag: $TAG_NAME"
+
+ # Delete local tag if exists
+ git tag -d "$TAG_NAME" 2>/dev/null || true
+ # Delete remote tag if exists
+ git push origin ":refs/tags/$TAG_NAME" 2>/dev/null || true
+
- name: Run bump2version
run: |
cd ${{ steps.package.outputs.directory }}