Fix builds failing to checkout: stop deleting tags, fix tag passing
All checks were successful
Tests / Python Backend Tests (push) Successful in 5s
Tests / Frontend Tests (push) Successful in 8s
Tests / Rust Sidecar Tests (push) Successful in 2m3s

Two issues causing all builds to fail:

1. Cleanup steps deleted git tags along with releases. Since builds
   are dispatched asynchronously, they tried to checkout tags that
   had already been deleted. Now cleanup only deletes releases (which
   frees storage by removing assets) but preserves git tags.

2. Linux/macOS build workflows used $GITHUB_OUTPUT step outputs for
   the tag, which is unreliable on Gitea runners. Switched to the
   same job-level env var pattern (RELEASE_TAG) that works on Windows.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Developer
2026-04-07 12:27:05 -07:00
parent 11832e911b
commit 8fc2d11c5f
6 changed files with 24 additions and 64 deletions

View File

@@ -13,23 +13,14 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
NODE_VERSION: "20" NODE_VERSION: "20"
RELEASE_TAG: ${{ inputs.tag }}
steps: steps:
- name: Determine tag - name: Show tag
id: tag run: echo "Building for tag: ${RELEASE_TAG}"
run: |
TAG="${{ inputs.tag }}"
if [ -z "$TAG" ]; then
TAG="${{ github.event.inputs.tag }}"
fi
if [ -z "$TAG" ]; then
TAG=$(git ls-remote --tags --sort=-v:refname origin 'refs/tags/v*' | head -1 | sed 's|.*refs/tags/||')
fi
echo "Building for tag: ${TAG}"
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
ref: ${{ steps.tag.outputs.tag }} ref: ${{ inputs.tag }}
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
@@ -58,7 +49,7 @@ jobs:
run: | run: |
sudo apt-get install -y jq sudo apt-get install -y jq
REPO_API="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}" REPO_API="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}"
TAG="${{ steps.tag.outputs.tag }}" TAG="${RELEASE_TAG}"
echo "Release tag: ${TAG}" echo "Release tag: ${TAG}"
echo "Waiting for release ${TAG} to be available..." echo "Waiting for release ${TAG} to be available..."

View File

@@ -13,23 +13,14 @@ jobs:
runs-on: macos-latest runs-on: macos-latest
env: env:
NODE_VERSION: "20" NODE_VERSION: "20"
RELEASE_TAG: ${{ inputs.tag }}
steps: steps:
- name: Determine tag - name: Show tag
id: tag run: echo "Building for tag: ${RELEASE_TAG}"
run: |
TAG="${{ inputs.tag }}"
if [ -z "$TAG" ]; then
TAG="${{ github.event.inputs.tag }}"
fi
if [ -z "$TAG" ]; then
TAG=$(git ls-remote --tags --sort=-v:refname origin 'refs/tags/v*' | head -1 | sed 's|.*refs/tags/||')
fi
echo "Building for tag: ${TAG}"
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
ref: ${{ steps.tag.outputs.tag }} ref: ${{ inputs.tag }}
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
@@ -56,7 +47,7 @@ jobs:
run: | run: |
which jq || brew install jq which jq || brew install jq
REPO_API="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}" REPO_API="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}"
TAG="${{ steps.tag.outputs.tag }}" TAG="${RELEASE_TAG}"
echo "Release tag: ${TAG}" echo "Release tag: ${TAG}"
echo "Waiting for release ${TAG} to be available..." echo "Waiting for release ${TAG} to be available..."

View File

@@ -13,23 +13,14 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
PYTHON_VERSION: "3.11" PYTHON_VERSION: "3.11"
RELEASE_TAG: ${{ inputs.tag }}
steps: steps:
- name: Determine tag - name: Show tag
id: tag run: echo "Building for tag: ${RELEASE_TAG}"
run: |
TAG="${{ inputs.tag }}"
if [ -z "$TAG" ]; then
TAG="${{ github.event.inputs.tag }}"
fi
if [ -z "$TAG" ]; then
TAG=$(git ls-remote --tags --sort=-v:refname origin 'refs/tags/sidecar-v*' | head -1 | sed 's|.*refs/tags/||')
fi
echo "Building for tag: ${TAG}"
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
ref: ${{ steps.tag.outputs.tag }} ref: ${{ inputs.tag }}
- name: Install uv - name: Install uv
run: | run: |
@@ -75,7 +66,7 @@ jobs:
run: | run: |
sudo apt-get install -y jq sudo apt-get install -y jq
REPO_API="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}" REPO_API="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}"
TAG="${{ steps.tag.outputs.tag }}" TAG="${RELEASE_TAG}"
echo "Waiting for sidecar release ${TAG} to be available..." echo "Waiting for sidecar release ${TAG} to be available..."
for i in $(seq 1 30); do for i in $(seq 1 30); do

View File

@@ -13,23 +13,14 @@ jobs:
runs-on: macos-latest runs-on: macos-latest
env: env:
PYTHON_VERSION: "3.11" PYTHON_VERSION: "3.11"
RELEASE_TAG: ${{ inputs.tag }}
steps: steps:
- name: Determine tag - name: Show tag
id: tag run: echo "Building for tag: ${RELEASE_TAG}"
run: |
TAG="${{ inputs.tag }}"
if [ -z "$TAG" ]; then
TAG="${{ github.event.inputs.tag }}"
fi
if [ -z "$TAG" ]; then
TAG=$(git ls-remote --tags --sort=-v:refname origin 'refs/tags/sidecar-v*' | head -1 | sed 's|.*refs/tags/||')
fi
echo "Building for tag: ${TAG}"
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
ref: ${{ steps.tag.outputs.tag }} ref: ${{ inputs.tag }}
- name: Install uv - name: Install uv
run: | run: |
@@ -66,7 +57,7 @@ jobs:
run: | run: |
which jq || brew install jq which jq || brew install jq
REPO_API="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}" REPO_API="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}"
TAG="${{ steps.tag.outputs.tag }}" TAG="${RELEASE_TAG}"
echo "Waiting for sidecar release ${TAG} to be available..." echo "Waiting for sidecar release ${TAG} to be available..."
for i in $(seq 1 30); do for i in $(seq 1 30); do

View File

@@ -159,9 +159,7 @@ jobs:
echo " Deleting release ${TAG} (ID: ${ID})..." echo " Deleting release ${TAG} (ID: ${ID})..."
curl -s -X DELETE -H "Authorization: token ${BUILD_TOKEN}" \ curl -s -X DELETE -H "Authorization: token ${BUILD_TOKEN}" \
"${REPO_API}/releases/${ID}" "${REPO_API}/releases/${ID}"
# Keep the git tag -- only delete the release (assets).
# Also delete the tag # Deleting tags breaks builds that haven't checked out yet.
curl -s -X DELETE -H "Authorization: token ${BUILD_TOKEN}" \
"${REPO_API}/tags/${TAG}"
done done
echo "Cleanup complete" echo "Cleanup complete"

View File

@@ -166,9 +166,7 @@ jobs:
echo " Deleting sidecar release ${TAG} (ID: ${ID})..." echo " Deleting sidecar release ${TAG} (ID: ${ID})..."
curl -s -X DELETE -H "Authorization: token ${BUILD_TOKEN}" \ curl -s -X DELETE -H "Authorization: token ${BUILD_TOKEN}" \
"${REPO_API}/releases/${ID}" "${REPO_API}/releases/${ID}"
# Keep the git tag -- only delete the release (assets).
# Also delete the tag # Deleting tags breaks builds that haven't checked out yet.
curl -s -X DELETE -H "Authorization: token ${BUILD_TOKEN}" \
"${REPO_API}/tags/${TAG}"
done done
echo "Cleanup complete" echo "Cleanup complete"