From 275913c3ee7c8a0111efc4e1c2428875477c64a3 Mon Sep 17 00:00:00 2001 From: Charlie Truong Date: Mon, 11 May 2026 14:37:24 -0500 Subject: [PATCH] ci: Ensure bump branch is created first for dependabot Signed-off-by: Charlie Truong --- .github/workflows/_update_dependencies.yml | 31 ++++++++++++++-------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/workflows/_update_dependencies.yml b/.github/workflows/_update_dependencies.yml index ec7736276..05a6158c8 100644 --- a/.github/workflows/_update_dependencies.yml +++ b/.github/workflows/_update_dependencies.yml @@ -25,10 +25,26 @@ jobs: id: ref run: echo "date=$(date +%F)" | tee -a "$GITHUB_OUTPUT" + create-bump-branch: + needs: [pre-flight] + runs-on: ubuntu-latest + env: + SOURCE_BRANCH: ${{ needs.pre-flight.outputs.bump-branch }} + TARGET_BRANCH: ${{ inputs.target-branch }} + steps: + - name: Create bump branch if not exists + run: | + if ! git ls-remote --exit-code origin $SOURCE_BRANCH; then + git checkout -b $SOURCE_BRANCH $TARGET_BRANCH + git push origin $SOURCE_BRANCH + fi + update-lockfile: environment: nemo-ci runs-on: ubuntu-latest - needs: [pre-flight] + needs: + - pre-flight + - create-bump-branch strategy: fail-fast: false matrix: @@ -50,13 +66,6 @@ jobs: run: | docker build -f docker/Dockerfile.ci --build-arg PACKAGE=${{ matrix.package }} -t eval . - - name: Create bump branch if not exists - run: | - if ! git ls-remote --exit-code origin $SOURCE_BRANCH; then - git checkout -b $SOURCE_BRANCH $TARGET_BRANCH - git push origin $SOURCE_BRANCH - fi - - name: Checkout repo uses: actions/checkout@v6 with: @@ -135,10 +144,10 @@ jobs: title: ${{ env.title }} token: ${{ secrets.PAT }} body: | - 🚀 PR to bump `uv.lock` in `${{ inputs.target-branch }}`. + 🚀 PR to bump `uv.lock` in `${{ inputs.target-branch }}`. - 📝 Please remember the following to-do's before merge: - - [ ] Verify the presubmit CI + 📝 Please remember the following to-do's before merge: + - [ ] Verify the presubmit CI 🙏 Please merge this PR only if the CI workflow completed successfully. commit-message: ${{ env.title }}