Skip to content
Merged
Changes from 1 commit
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
33 changes: 22 additions & 11 deletions .github/workflows/update-extensions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,55 @@ on:
workflow_dispatch:
repository_dispatch:
types: [trigger-npm-update]

jobs:
update-dependency:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
contents: write
pull-requests: write
strategy:
matrix:
branch: [main, 'v/24.1', 'v/23.3', api]
branch: [main, 'v24.3', 'v/24.2', 'v/24.1', api]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix branch naming in the matrix
The entries 'v/24.2' and 'v/24.1' include an extra slash and won’t match your actual branch names (v24.2, v24.1). Please remove the slash so the workflow triggers on the intended branches.

Comment thread
JakeSCahill marked this conversation as resolved.
Outdated

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

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

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

- name: Install dependencies
run: npm install

- name: Update @redpanda-data/docs-extensions-and-macros
run: npm update @redpanda-data/docs-extensions-and-macros
- name: Commit changes
run: |
git config --global user.name "vbotbuildovich"
git config --global user.email "vbotbuildovich@users.noreply.github.com"
git add package.json package-lock.json
git commit -m "auto-docs: Update @redpanda-data/docs-extensions-and-macros"
git push origin ${{ matrix.branch }}
env:
ACCESS_TOKEN: ${{ env.ACTIONS_BOT_TOKEN }}

- name: Create Pull Request
Comment thread
JakeSCahill marked this conversation as resolved.
Outdated
uses: peter-evans/create-pull-request@v6
with:
token: ${{ env.ACTIONS_BOT_TOKEN }}
commit-message: auto-docs: Update @redpanda-data/docs-extensions-and-macros
labels: auto-docs
Comment thread
JakeSCahill marked this conversation as resolved.
title: auto-docs: Update @redpanda-data/docs-extensions-and-macros
body: |
This PR updates `@redpanda-data/docs-extensions-and-macros` using `npm update`.
branch: update/docs-extensions-and-macros-${{ matrix.branch }}
base: ${{ matrix.branch }}