- Notifications
You must be signed in to change notification settings - Fork 2
Add GitHub Action workflows to support Admin API v2 #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
8 commits Select commit Hold shift + click to select a range
a18da03 Add GitHub Action workflows to support Admin API v2
JakeSCahill 9d3b587 Apply suggestions
JakeSCahill d1b303d Update step
JakeSCahill af4dc64 support versioned overlays
JakeSCahill 680965b Use AWS secret
JakeSCahill b1ab3b0 Merge branch 'main' into DOC-1705
JakeSCahill e617f96 Add extension to update doc-tools CLI
JakeSCahill 025698a Merge branch 'main' into DOC-1705
JakeSCahill File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| name: Bundle Admin OpenAPI Spec | ||
| | ||
| on: | ||
| repository_dispatch: | ||
| types: [redpanda-openapi-bundle] | ||
| workflow_dispatch: | ||
| inputs: | ||
| tag: | ||
| description: 'Redpanda tag to bundle (such as v24.3.2)' | ||
| required: true | ||
| type: string | ||
| | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| | ||
JakeSCahill marked this conversation as resolved. Show resolved Hide resolved | ||
| concurrency: | ||
| group: openapi-${{ github.event.client_payload.tag || inputs.tag || github.run_id }} | ||
| cancel-in-progress: false | ||
| | ||
| jobs: | ||
| bundle: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| TAG: ${{ github.event.client_payload.tag || inputs.tag }} | ||
| steps: | ||
| | ||
| - 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 }} | ||
| | ||
| - uses: aws-actions/aws-secretsmanager-get-secrets@v2 | ||
| with: | ||
| secret-ids: | | ||
| ,sdlc/prod/github/actions_bot_token | ||
| parse-json-secrets: true | ||
| | ||
JakeSCahill marked this conversation as resolved. Show resolved Hide resolved | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| token: ${{ env.ACTIONS_BOT_TOKEN }} | ||
| | ||
| - name: Set up Node.js (with npm cache) | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
| cache: 'npm' | ||
| | ||
| - name: Validate tag | ||
| run: | | ||
| if [ -z "${TAG}" ]; then | ||
| echo "ERROR: No tag provided. Pass client_payload.tag on repository_dispatch or use workflow_dispatch input." | ||
| exit 1 | ||
| fi | ||
| echo "Using tag: ${TAG}" | ||
| - name: Install dependencies | ||
| run: npm install | ||
| | ||
JakeSCahill marked this conversation as resolved. Show resolved Hide resolved | ||
| - name: Install tools | ||
| run: | | ||
| npx doc-tools install-test-dependencies | ||
| - name: Generate RPCN Connector docs | ||
| id: generate | ||
| run: | | ||
| npx doc-tools generate bundle-openapi --tag "${TAG}" --use-admin-major-version --surface admin --out-admin admin/admin-v2.yaml | ||
| - name: Create Pull Request | ||
| uses: peter-evans/create-pull-request@v6 | ||
| with: | ||
| token: ${{ env.ACTIONS_BOT_TOKEN }} | ||
| base: main | ||
| branch: auto-docs/admin-api | ||
| title: 'auto-docs: Update Admin API docs for ${{ env.TAG }}' | ||
| commit-message: 'docs: Update Admin API docs for ${{ env.TAG }}' | ||
| body: | | ||
| This PR adds the latest OpenAPI spec for version **${{ env.TAG }}** of the Redpanda Admin API: | ||
| ``` | ||
| npx doc-tools generate bundle-openapi --tag ${{ env.TAG }} --use-admin-major-version --surface admin --out-admin admin/admin.yaml | ||
| ``` | ||
| labels: auto-docs | ||
JakeSCahill marked this conversation as resolved. Show resolved Hide resolved | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.