diff --git a/.github/workflows/bump-go-toolchain.yml b/.github/workflows/bump-go-toolchain.yml index 1954312bdda..e91c7f37ec7 100644 --- a/.github/workflows/bump-go-toolchain.yml +++ b/.github/workflows/bump-go-toolchain.yml @@ -92,6 +92,7 @@ jobs: run: git diff - name: Create pull request + id: cpr if: steps.check.outputs.needed == 'true' && inputs.version == '' uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 with: @@ -104,3 +105,23 @@ jobs: Release notes: https://go.dev/doc/devel/release#${{ steps.latest.outputs.toolchain }} reviewers: simonfaltum,andrewnester,anton-107,denik,janniklasrose,pietern,shreyas-goenka labels: dependencies + + # Add the changelog fragment as a follow-up commit on the PR branch: the + # fragment references the PR number, which only exists once the PR above + # has been created. + - name: Add changelog fragment + if: steps.cpr.outputs.pull-request-number + env: + TOOLCHAIN: ${{ steps.latest.outputs.toolchain }} + BRANCH: ${{ steps.cpr.outputs.pull-request-branch }} + PR: ${{ steps.cpr.outputs.pull-request-number }} + run: |- + git fetch origin "$BRANCH" + git checkout -f -B "$BRANCH" FETCH_HEAD + fragment=".nextchanges/dependency-updates/go-toolchain-${TOOLCHAIN}.md" + echo "Bump Go toolchain to ${TOOLCHAIN#go} ([#${PR}](https://github.com/databricks/cli/pull/${PR}))." > "$fragment" + git add "$fragment" + git -c user.name='github-actions[bot]' \ + -c user.email='41898282+github-actions[bot]@users.noreply.github.com' \ + commit -m "Add changelog fragment" + git push origin "HEAD:$BRANCH" diff --git a/.nextchanges/dependency-updates/go-toolchain-go1.26.6.md b/.nextchanges/dependency-updates/go-toolchain-go1.26.6.md new file mode 100644 index 00000000000..d45478bc8d5 --- /dev/null +++ b/.nextchanges/dependency-updates/go-toolchain-go1.26.6.md @@ -0,0 +1 @@ +Bump Go toolchain to 1.26.6 ([#6266](https://github.com/databricks/cli/pull/6266)).