From 54cb49dd8ac3e4ec543a1d3e90f6e3b9ce17124f Mon Sep 17 00:00:00 2001 From: Matt DiMeglio Date: Sat, 7 Feb 2026 23:55:12 -0500 Subject: [PATCH] Change to grep --- .github/workflows/api-deploy-nonprod.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/api-deploy-nonprod.yml b/.github/workflows/api-deploy-nonprod.yml index 82b710e..f92ce4e 100644 --- a/.github/workflows/api-deploy-nonprod.yml +++ b/.github/workflows/api-deploy-nonprod.yml @@ -113,20 +113,19 @@ jobs: -H "Content-Type: application/json" \ -d "{\"buildType\": {\"id\": \"$TEAMCITY_BUILD_ID\"}}" \ "$TEAMCITY_URL/httpAuth/app/rest/buildQueue" \ - | xmllint --xpath 'string(//build/@id)' -) + | grep -oP 'id="\K[0-9]+') echo "Build queued with ID: $BUILD_ID" # Query only the build state BUILD_STATE=$(curl -s -u "$TEAMCITY_USER:$TEAMCITY_TOKEN" \ "$TEAMCITY_URL/httpAuth/app/rest/buildQueue/id:$BUILD_ID?fields=build(state)" \ - | xmllint --xpath 'string(//build/@state)' -) + | grep -oP 'state="\K[^"]+') echo "Build state: $BUILD_STATE" # Set GitHub Actions output echo "build_state=$BUILD_STATE" >> $GITHUB_OUTPUT - - name: Show Build State run: echo "TeamCity build is ${{ steps.trigger.outputs.build_state }}"