From e130ad1de0020e5daa578a5e2e5e2fae66fc0474 Mon Sep 17 00:00:00 2001 From: Diamon Wiggins Date: Tue, 13 May 2025 18:48:19 -0400 Subject: [PATCH 1/3] add workflow dispatch for ec release notes --- .../embedded-cluster-release-notes.yml | 95 +++++++++++++++++++ docs/release-notes/rn-embedded-cluster.md | 2 + 2 files changed, 97 insertions(+) create mode 100644 .github/workflows/embedded-cluster-release-notes.yml diff --git a/.github/workflows/embedded-cluster-release-notes.yml b/.github/workflows/embedded-cluster-release-notes.yml new file mode 100644 index 0000000000..1d00e9c524 --- /dev/null +++ b/.github/workflows/embedded-cluster-release-notes.yml @@ -0,0 +1,95 @@ +name: embedded-cluster-release-notes +on: + repository_dispatch: + types: [embedded-cluster-release-notes] + inputs: + version: + description: Embedded Cluster version + required: true + +jobs: + generate-release-notes-pr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Generate Release Notes + id: release-notes + env: + EC_VERSION: ${{ github.event.client_payload.version }} + uses: replicatedhq/release-notes-generator@main + with: + owner-repo: replicatedhq/embedded-cluster + head: $EC_VERSION + title: ${EC_VERSION#v} + description: '' + include-pr-links: false + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Update Release Notes + env: + PATTERN: ".+RELEASE_NOTES_PLACEHOLDER.+" + EC_VERSION: ${{ github.event.client_payload.version }} + run: | + # Extract EC version without v prefix if it exists + EC_VERSION_CLEAN=${EC_VERSION#v} + + # Create the full release notes content + cat > /tmp/release-notes.txt << EOF + + ## ${EC_VERSION_CLEAN} + + Released on $(date +'%B %-d, %Y') + + + + ${{ steps.release-notes.outputs.release-notes }} + EOF + + sed -i -E "/$PATTERN/r /tmp/release-notes.txt" docs/release-notes/rn-embedded-cluster.md + rm -f /tmp/release-notes.txt + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v7 + id: cpr + with: + token: ${{ secrets.REPLICATED_GH_PAT }} + commit-message: Embedded Cluster ${{ github.event.client_payload.version }} release notes + title: Embedded Cluster ${{ github.event.client_payload.version }} release notes + branch: automation/embedded-cluster-release-notes-${{ github.event.client_payload.version }} + delete-branch: true + base: "main" + body: "Automated changes by the [embedded-cluster-release-notes](https://github.com/replicatedhq/replicated-docs/blob/main/.github/workflows/embedded-cluster-release-notes.yml) GitHub action. Please manually replace the version table placeholder." + + - name: Check outputs + run: | + echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" + echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" + + - name: Slack Notification + uses: slackapi/slack-github-action@v2.0.0 + with: + webhook: ${{ secrets.EMBEDDED_CLUSTER_RELEASE_NOTES_SLACK_WEBHOOK }} + webhook-type: webhook-trigger + payload: | + version: "${{ github.event.client_payload.version }}" + pull_request_url: "${{steps.cpr.outputs.pull-request-url}}" diff --git a/docs/release-notes/rn-embedded-cluster.md b/docs/release-notes/rn-embedded-cluster.md index eb3f7b8397..78bbfe355d 100644 --- a/docs/release-notes/rn-embedded-cluster.md +++ b/docs/release-notes/rn-embedded-cluster.md @@ -10,6 +10,8 @@ This topic contains release notes for the [Replicated Embedded Cluster](/vendor/ Additionally, these release notes list the versions of Kubernetes and Replicated KOTS that are available with each version of Embedded Cluster. + + ## 2.4.0 Released on May 6, 2025 From 472a9b5dc06535ee8177eab2229c90583d15e482 Mon Sep 17 00:00:00 2001 From: Diamon Wiggins Date: Wed, 14 May 2025 11:05:50 -0400 Subject: [PATCH 2/3] disable slack webhook for now --- .../workflows/embedded-cluster-release-notes.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/embedded-cluster-release-notes.yml b/.github/workflows/embedded-cluster-release-notes.yml index 1d00e9c524..47324af403 100644 --- a/.github/workflows/embedded-cluster-release-notes.yml +++ b/.github/workflows/embedded-cluster-release-notes.yml @@ -85,11 +85,11 @@ jobs: echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" - - name: Slack Notification - uses: slackapi/slack-github-action@v2.0.0 - with: - webhook: ${{ secrets.EMBEDDED_CLUSTER_RELEASE_NOTES_SLACK_WEBHOOK }} - webhook-type: webhook-trigger - payload: | - version: "${{ github.event.client_payload.version }}" - pull_request_url: "${{steps.cpr.outputs.pull-request-url}}" + #- name: Slack Notification + # uses: slackapi/slack-github-action@v2.0.0 + # with: + # webhook: ${{ secrets.EMBEDDED_CLUSTER_RELEASE_NOTES_SLACK_WEBHOOK }} + # webhook-type: webhook-trigger + # payload: | + # version: "${{ github.event.client_payload.version }}" + # pull_request_url: "${{steps.cpr.outputs.pull-request-url}}" From 5626cb5b44db2641c329172f22bcbc9418edf8e5 Mon Sep 17 00:00:00 2001 From: Diamon Wiggins Date: Thu, 15 May 2025 10:08:46 -0400 Subject: [PATCH 3/3] uncomment slack notificatin --- .../workflows/embedded-cluster-release-notes.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/embedded-cluster-release-notes.yml b/.github/workflows/embedded-cluster-release-notes.yml index 47324af403..d6e9873c81 100644 --- a/.github/workflows/embedded-cluster-release-notes.yml +++ b/.github/workflows/embedded-cluster-release-notes.yml @@ -85,11 +85,11 @@ jobs: echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" - #- name: Slack Notification - # uses: slackapi/slack-github-action@v2.0.0 - # with: - # webhook: ${{ secrets.EMBEDDED_CLUSTER_RELEASE_NOTES_SLACK_WEBHOOK }} - # webhook-type: webhook-trigger - # payload: | - # version: "${{ github.event.client_payload.version }}" - # pull_request_url: "${{steps.cpr.outputs.pull-request-url}}" + - name: Slack Notification + uses: slackapi/slack-github-action@v2.1.0 + with: + webhook: ${{ secrets.EMBEDDED_CLUSTER_RELEASE_NOTES_SLACK_WEBHOOK }} + webhook-type: webhook-trigger + payload: | + version: "${{ github.event.client_payload.version }}" + pull_request_url: "${{steps.cpr.outputs.pull-request-url}}"