Skip to content

Commit 2262ba8

Browse files
authored
Open pull requests to update packages
1 parent 1ffdc74 commit 2262ba8

File tree

1 file changed

+22
-11
lines changed

1 file changed

+22
-11
lines changed

.github/workflows/update-extensions.yml

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,55 @@ on:
44
workflow_dispatch:
55
repository_dispatch:
66
types: [trigger-npm-update]
7+
78
jobs:
89
update-dependency:
910
runs-on: ubuntu-latest
1011
permissions:
1112
id-token: write
12-
contents: read
13+
contents: write
14+
pull-requests: write
1315
strategy:
1416
matrix:
15-
branch: [main, 'v/24.1', 'v/23.3', api]
17+
branch: [main, 'v24.3', 'v/24.2', 'v/24.1', api]
18+
1619
steps:
1720
- uses: aws-actions/configure-aws-credentials@v4
1821
with:
1922
aws-region: ${{ vars.RP_AWS_CRED_REGION }}
2023
role-to-assume: arn:aws:iam::${{ secrets.RP_AWS_CRED_ACCOUNT_ID }}:role/${{ vars.RP_AWS_CRED_BASE_ROLE_NAME }}${{ github.event.repository.name }}
24+
2125
- uses: aws-actions/aws-secretsmanager-get-secrets@v2
2226
with:
2327
secret-ids: |
2428
,sdlc/prod/github/actions_bot_token
2529
parse-json-secrets: true
30+
2631
- name: Checkout the repository
2732
uses: actions/checkout@v4
2833
with:
2934
ref: ${{ matrix.branch }}
3035
token: ${{ env.ACTIONS_BOT_TOKEN }}
36+
3137
- name: Set up Node.js
3238
uses: actions/setup-node@v4
3339
with:
3440
node-version: '18'
41+
3542
- name: Install dependencies
3643
run: npm install
44+
3745
- name: Update @redpanda-data/docs-extensions-and-macros
3846
run: npm update @redpanda-data/docs-extensions-and-macros
39-
- name: Commit changes
40-
run: |
41-
git config --global user.name "vbotbuildovich"
42-
git config --global user.email "[email protected]"
43-
git add package.json package-lock.json
44-
git commit -m "auto-docs: Update @redpanda-data/docs-extensions-and-macros"
45-
git push origin ${{ matrix.branch }}
46-
env:
47-
ACCESS_TOKEN: ${{ env.ACTIONS_BOT_TOKEN }}
47+
48+
- name: Create Pull Request
49+
uses: peter-evans/create-pull-request@v6
50+
with:
51+
token: ${{ env.ACTIONS_BOT_TOKEN }}
52+
commit-message: auto-docs: Update @redpanda-data/docs-extensions-and-macros
53+
labels: auto-docs
54+
title: auto-docs: Update @redpanda-data/docs-extensions-and-macros
55+
body: |
56+
This PR updates `@redpanda-data/docs-extensions-and-macros` using `npm update`.
57+
branch: update/docs-extensions-and-macros-${{ matrix.branch }}
58+
base: ${{ matrix.branch }}

0 commit comments

Comments
 (0)