Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
917 changes: 917 additions & 0 deletions .github/copilot-instructions.md

Large diffs are not rendered by default.

112 changes: 112 additions & 0 deletions .github/workflows/update-property-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
---
name: Generate Property Docs

on:
workflow_dispatch:
inputs:
tag:
description: "Tag to use for property doc generation"
required: true
type: string
repository_dispatch:
types: [trigger-property-docs-generation]

jobs:
generate-property-docs:
runs-on: ubuntu-24.04
permissions:
id-token: write
contents: write
pull-requests: write

steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ vars.RP_AWS_CRED_REGION }}
role-to-assume: arn:aws:iam::${{ secrets.RP_AWS_CRED_ACCOUNT_ID }}:role/${{ vars.RP_AWS_CRED_BASE_ROLE_NAME }}${{ github.event.repository.name }}

- name: Get secrets from AWS Secrets Manager
uses: aws-actions/aws-secretsmanager-get-secrets@v2
with:
secret-ids: |
,sdlc/prod/github/actions_bot_token
parse-json-secrets: true

- name: Checkout the repository
uses: actions/checkout@v4
with:
ref: main
token: ${{ env.ACTIONS_BOT_TOKEN }}

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm ci

- name: Determine tag
id: tag
run: |
if [ -n "${{ github.event.inputs.tag }}" ]; then
echo "tag=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
elif [ -n "${{ github.event.client_payload.tag }}" ]; then
echo "tag=${{ github.event.client_payload.tag }}" >> $GITHUB_OUTPUT
else
echo "❌ No tag provided via input or dispatch payload" >&2
exit 1
fi

- name: Check if tag is newer than antora.yml latest
id: version_check
run: |
set -euo pipefail
TAG="${{ steps.tag.outputs.tag }}"
CURRENT=$(grep 'latest-redpanda-tag:' antora.yml | awk '{print $2}' | tr -d '"')

echo "📄 Current latest-redpanda-tag in antora.yml: $CURRENT"
echo "🔖 Incoming tag: $TAG"

# Strip leading 'v' for numeric comparison
CUR_NUM=$(echo "$CURRENT" | sed 's/^v//')
NEW_NUM=$(echo "$TAG" | sed 's/^v//')

# Compare semver using sort -V
if [ "$(printf "%s\n%s" "$CUR_NUM" "$NEW_NUM" | sort -V | tail -n1)" = "$NEW_NUM" ] && [ "$CUR_NUM" != "$NEW_NUM" ]; then
echo "$TAG is newer than $CURRENT"
echo "is_newer=true" >> $GITHUB_OUTPUT
else
echo "$TAG is not newer than $CURRENT — skipping doc generation"
echo "is_newer=false" >> $GITHUB_OUTPUT
fi

- name: Generate property docs
if: steps.version_check.outputs.is_newer == 'true'
run: |
set -euo pipefail
echo "Running doc generation for: ${{ steps.tag.outputs.tag }}"
npx doc-tools generate property-docs \
--tag "${{ steps.tag.outputs.tag }}" \
--generate-partials \
--cloud-support \
--overrides docs-data/property-overrides.json
env:
GITHUB_TOKEN: ${{ env.ACTIONS_BOT_TOKEN }}

- name: Create pull request
if: steps.version_check.outputs.is_newer == 'true'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ env.ACTIONS_BOT_TOKEN }}
commit-message: "auto-docs: Update property docs for ${{ steps.tag.outputs.tag }}"
branch: update-property-docs-${{ steps.tag.outputs.tag }}
title: "auto-docs: Update property docs for tag ${{ steps.tag.outputs.tag }}"
body: |
This PR auto-generates updated Redpanda property documentation for **${{ steps.tag.outputs.tag }}**.
labels: auto-docs

- name: Skip notice
if: steps.version_check.outputs.is_newer != 'true'
run: echo "Skipping doc generation — tag is not newer than latest-redpanda-tag in antora.yml."
2 changes: 1 addition & 1 deletion antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ asciidoc:
# --
full-version: 25.3.1
latest-redpanda-tag: 'v25.3.1'
latest-console-tag: '3.30.1'
latest-console-tag: 'v3.3.1'
latest-release-commit: '6aa5af28b020b66e5caa966094882b7260497a53'
latest-operator-version: 'v2.3.8-24.3.6'
operator-beta-tag: ''
Expand Down
2,079 changes: 2,079 additions & 0 deletions docs-data/property-overrides.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion local-antora-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ content:
- url: https://github.com/redpanda-data/docs
branches: [v/*, shared, site-search,'!v-end-of-life/*']
- url: https://github.com/redpanda-data/cloud-docs
branches: 'main'
branches: 'config-automation'
- url: https://github.com/redpanda-data/redpanda-labs
branches: main
start_paths: [docs,'*/docs']
- url: https://github.com/redpanda-data/rp-connect-docs
branches: main
- url: https://github.com/redpanda-data/docs-site
branches: 'main'
start_paths: [home]
ui:
bundle:
url: https://github.com/redpanda-data/docs-ui/releases/latest/download/ui-bundle.zip
Expand Down
Loading