Skip to content

Commit c1030a3

Browse files
authored
fix(ci): make nightly release branch static and fix workflow structure (#14219)
* fix(ci): make nightly release branch static * fix(ci): repair nightly workflow structure and static branch refs * fix(ci): scope nightly reusable test job token permissions
1 parent 0a8ef93 commit c1030a3

1 file changed

Lines changed: 18 additions & 32 deletions

File tree

.github/workflows/nightly_build.yml

Lines changed: 18 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -49,31 +49,9 @@ jobs:
4949
run: |
5050
echo "Cannot skip tests while push_to_registry is true."
5151
exit 1
52-
resolve-release-branch:
53-
runs-on: ubuntu-latest
54-
outputs:
55-
branch: ${{ steps.get_branch.outputs.branch }}
56-
steps:
57-
- name: Find latest release branch
58-
id: get_branch
59-
run: |
60-
git ls-remote --heads https://github.com/${{ github.repository }} 'refs/heads/release-*' \
61-
| awk '{print $2}' \
62-
| sed 's|refs/heads/||' \
63-
| grep -E '^release-[0-9]+\.[0-9]+\.[0-9]+$' \
64-
| sort -V \
65-
| tail -n 1 > branch.txt
66-
67-
BRANCH=$(cat branch.txt)
68-
if [ -z "$BRANCH" ]; then
69-
echo "No release-* branch found in ${{ github.repository }}"
70-
exit 1
71-
fi
72-
echo "branch=$BRANCH" >> $GITHUB_OUTPUT
73-
echo "Using release branch: $BRANCH"
7452
create-nightly-tag:
7553
if: github.repository == 'langflow-ai/langflow'
76-
needs: [validate-inputs, resolve-release-branch]
54+
needs: [validate-inputs]
7755
runs-on: ubuntu-latest
7856
defaults:
7957
run:
@@ -90,7 +68,7 @@ jobs:
9068
- name: Checkout code
9169
uses: actions/checkout@v6
9270
with:
93-
ref: ${{ needs.resolve-release-branch.outputs.branch }}
71+
ref: release-1.11.0
9472
persist-credentials: true
9573
- name: Confirm branch
9674
run: git branch --show-current
@@ -223,13 +201,15 @@ jobs:
223201
frontend-tests-linux:
224202
if: github.repository == 'langflow-ai/langflow' && !inputs.skip_frontend_tests
225203
name: Run Frontend Tests - Linux
226-
needs: [resolve-release-branch, create-nightly-tag]
204+
needs: [create-nightly-tag]
205+
permissions:
206+
contents: read
227207
uses: ./.github/workflows/typescript_test.yml
228208
with:
229209
tests_folder: "tests"
230210
release: true
231211
runs-on: ubuntu-latest
232-
ref: ${{ needs.resolve-release-branch.outputs.branch }}
212+
ref: release-1.11.0
233213
secrets:
234214
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
235215
STORE_API_KEY: ${{ secrets.STORE_API_KEY }}
@@ -239,7 +219,9 @@ jobs:
239219
frontend-tests-windows:
240220
if: github.repository == 'langflow-ai/langflow' && !inputs.skip_frontend_tests
241221
name: Run Frontend Tests - Windows
242-
needs: [resolve-release-branch, create-nightly-tag]
222+
needs: [create-nightly-tag]
223+
permissions:
224+
contents: read
243225
# Windows tests are non-blocking - the release-nightly-build job only checks
244226
# frontend-tests-linux.result, allowing Windows tests to fail without blocking the build.
245227
# This gives us visibility into Windows-specific issues while we stabilize the tests.
@@ -248,7 +230,7 @@ jobs:
248230
tests_folder: "tests"
249231
release: true
250232
runs-on: windows-latest
251-
ref: ${{ needs.resolve-release-branch.outputs.branch }}
233+
ref: release-1.11.0
252234
secrets:
253235
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
254236
STORE_API_KEY: ${{ secrets.STORE_API_KEY }}
@@ -258,12 +240,14 @@ jobs:
258240
backend-unit-tests:
259241
if: github.repository == 'langflow-ai/langflow' && !inputs.skip_backend_tests
260242
name: Run Backend Unit Tests
261-
needs: [resolve-release-branch, create-nightly-tag]
243+
needs: [create-nightly-tag]
244+
permissions:
245+
contents: read
262246
uses: ./.github/workflows/python_test.yml
263247
with:
264248
python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]'
265249
runs-on: ${{ inputs['runs_on'] || github.event.inputs['runs_on'] || 'ubuntu-latest' }}
266-
ref: ${{ needs.resolve-release-branch.outputs.branch }}
250+
ref: release-1.11.0
267251
secrets:
268252
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
269253
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
@@ -282,10 +266,12 @@ jobs:
282266
stress-tests:
283267
if: github.repository == 'langflow-ai/langflow' && !inputs.skip_backend_tests
284268
name: Run Stress Tests
285-
needs: [resolve-release-branch, create-nightly-tag]
269+
needs: [create-nightly-tag]
270+
permissions:
271+
contents: read
286272
uses: ./.github/workflows/stress-tests.yml
287273
with:
288-
ref: ${{ needs.resolve-release-branch.outputs.branch }}
274+
ref: release-1.11.0
289275

290276
release-nightly-build:
291277
if: github.repository == 'langflow-ai/langflow' && always() && needs.create-nightly-tag.result == 'success' && needs.frontend-tests-linux.result != 'failure' && needs.backend-unit-tests.result != 'failure'

0 commit comments

Comments
 (0)