Skip to content

Commit cea2b62

Browse files
authored
fix: always delete test branch on error or successful runs (#3102)
1 parent b6c8a98 commit cea2b62

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/tinybird-ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,3 +223,10 @@ jobs:
223223
echo "Config file not found at '${CONFIG_FILE}', running with default values"
224224
${BASE_CMD} coverage --wait ${LABELS_CMD}
225225
fi
226+
227+
- name: Cleanup test Branch
228+
if: always()
229+
run: |
230+
BRANCH_NAME="tmp_ci_${_NORMALIZED_BRANCH_NAME}_${{ github.event.pull_request.number }}"
231+
echo "Attempting to delete branch: $BRANCH_NAME"
232+
tb --host ${{ secrets.TB_HOST }} --token ${{ secrets.TB_ADMIN_TOKEN }} branch rm $BRANCH_NAME --yes || echo "Branch deletion failed or branch may not exist."

0 commit comments

Comments
 (0)