Fix builds failing to checkout: stop deleting tags, fix tag passing
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:
@@ -13,23 +13,14 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
PYTHON_VERSION: "3.11"
|
||||
RELEASE_TAG: ${{ inputs.tag }}
|
||||
steps:
|
||||
- name: Determine tag
|
||||
id: 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
|
||||
- name: Show tag
|
||||
run: echo "Building for tag: ${RELEASE_TAG}"
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ steps.tag.outputs.tag }}
|
||||
ref: ${{ inputs.tag }}
|
||||
|
||||
- name: Install uv
|
||||
run: |
|
||||
@@ -75,7 +66,7 @@ jobs:
|
||||
run: |
|
||||
sudo apt-get install -y jq
|
||||
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..."
|
||||
for i in $(seq 1 30); do
|
||||
|
||||
Reference in New Issue
Block a user