kubernetes-installer-release-notes #92
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: kubernetes-installer-release-notes | |
on: | |
repository_dispatch: | |
types: [kubernetes-installer-release-notes] | |
inputs: | |
version: | |
description: kURL version | |
required: true | |
jobs: | |
generate-release-notes-pr: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Generate Release Notes | |
id: release-notes | |
env: | |
KURL_VERSION: ${{ github.event.client_payload.version }} | |
uses: replicatedhq/release-notes-generator@main | |
with: | |
owner-repo: replicatedhq/kurl | |
head: $KURL_VERSION | |
title: $KURL_VERSION | |
include-pr-links: false | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
feature-type-labels: type::feature,kurl::type::feature | |
- name: Update Release Notes | |
env: | |
PATTERN: ".+RELEASE_NOTES_PLACEHOLDER.+" | |
run: | | |
cat <<EOT >> /tmp/release-notes.txt | |
${{ steps.release-notes.outputs.release-notes }} | |
EOT | |
sed -i -E "/$PATTERN/r /tmp/release-notes.txt" docs/release-notes/rn-kubernetes-installer.md | |
rm -rf /tmp/release-notes.txt | |
- name: Create Pull Request # creates a PR if there are differences | |
uses: peter-evans/create-pull-request@v3 | |
id: cpr | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: Kubernetes Installer ${{ github.event.client_payload.version }} release notes | |
title: Kubernetes Installer ${{ github.event.client_payload.version }} release notes | |
branch: automation/kubernetes-installer-release-notes-${{ github.event.client_payload.version }} | |
delete-branch: true | |
base: "main" | |
body: "Automated changes by the [kubernetes-installer-release-notes](https://github.com/replicatedhq/replicated-docs/blob/main/.github/workflows/kubernetes-installer-release-notes.yml) GitHub action" | |
- 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/[email protected] | |
with: | |
payload: | | |
{ | |
"version": "${{ github.event.client_payload.version }}", | |
"pull_request_url": "${{steps.cpr.outputs.pull-request-url}}" | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.KURL_RELEASE_NOTES_SLACK_WEBHOOK }} |