From fdda31ad706abbfa5afaa045163fd2ee31d41a6c Mon Sep 17 00:00:00 2001 From: Fan Shang Xiang Date: Thu, 27 Feb 2025 20:26:31 +0800 Subject: [PATCH] commit release note to doc/release-note-vxxxx branch (#8469) --- .github/workflows/release.yaml | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d790e3d81c..8fca5858c0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -155,7 +155,6 @@ jobs: - build-acr-credential-provider permissions: contents: write - pull-requests: write steps: - name: Harden Runner uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0 @@ -166,7 +165,7 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: documentation - fetch-depth: 0 + fetch-depth: 2 - name: Setup Golang uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: @@ -190,3 +189,31 @@ jobs: ./artifacts/cloud-node-manager-*-*/* ./artifacts/cloud-controller-manager-*-*/* ./artifacts/acr-credential-provider-*-*/* + - name: Update site release note + uses: peter-evans/create-pull-request@4320041ed380b20e97d388d56a7fb4f9b8c20e79 # v7.0.0 + with: + branch: doc/release-note-${{github.ref_name}} + delete-branch: true + base: documentation + commit-message: Update release notes for ${{github.ref_name}} + + - uses: stefanzweifel/git-auto-commit-action@v5 + with: + # Optional. Commit message for the created commit. + # Defaults to "Apply automatic changes" + commit_message: Update release notes for ${{github.ref_name}} + + # Optional. Local and remote branch name where commit is going to be pushed + # to. Defaults to the current branch. + # You might need to set `create_branch: true` if the branch does not exist. + branch: doc/release-note-${{github.ref_name}} + + # Optional glob pattern of files which should be added to the commit + # Defaults to all (.) + # See the `pathspec`-documentation for git + # - https://git-scm.com/docs/git-add#Documentation/git-add.txt-ltpathspecgt82308203 + # - https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefpathspecapathspec + file_pattern: './content/en/blog/releases/*.md' + + # Optional. Create given branch name in local and remote repository. + create_branch: true