From 2262ba8a65f501e867fda42e968f24a61c4d28b5 Mon Sep 17 00:00:00 2001 From: Jake Cahill <45230295+JakeSCahill@users.noreply.github.com> Date: Fri, 2 May 2025 09:58:10 +0100 Subject: [PATCH 1/4] Open pull requests to update packages --- .github/workflows/update-extensions.yml | 33 ++++++++++++++++--------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/.github/workflows/update-extensions.yml b/.github/workflows/update-extensions.yml index 436b3fa17..2b012a9cc 100644 --- a/.github/workflows/update-extensions.yml +++ b/.github/workflows/update-extensions.yml @@ -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] + 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 + 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 + 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 }} From 45931651c066e368707a5796d40c53240cc33608 Mon Sep 17 00:00:00 2001 From: Jake Cahill <45230295+JakeSCahill@users.noreply.github.com> Date: Fri, 2 May 2025 09:59:37 +0100 Subject: [PATCH 2/4] Apply suggestions from code review --- .github/workflows/update-extensions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-extensions.yml b/.github/workflows/update-extensions.yml index 2b012a9cc..bb839148b 100644 --- a/.github/workflows/update-extensions.yml +++ b/.github/workflows/update-extensions.yml @@ -45,7 +45,7 @@ jobs: - name: Update @redpanda-data/docs-extensions-and-macros run: npm update @redpanda-data/docs-extensions-and-macros - - name: Create Pull Request + - name: Create pull request uses: peter-evans/create-pull-request@v6 with: token: ${{ env.ACTIONS_BOT_TOKEN }} From 9e8de20c77b8794ce7116c2f0c402d4611f4565c Mon Sep 17 00:00:00 2001 From: Jake Cahill <45230295+JakeSCahill@users.noreply.github.com> Date: Fri, 2 May 2025 10:15:45 +0100 Subject: [PATCH 3/4] Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .github/workflows/update-extensions.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-extensions.yml b/.github/workflows/update-extensions.yml index bb839148b..6104c46ef 100644 --- a/.github/workflows/update-extensions.yml +++ b/.github/workflows/update-extensions.yml @@ -14,7 +14,7 @@ jobs: pull-requests: write strategy: matrix: - branch: [main, 'v24.3', 'v/24.2', 'v/24.1', api] + branch: [main, 'v/24.3', 'v/24.2', 'v/24.1', api] steps: - uses: aws-actions/configure-aws-credentials@v4 @@ -49,7 +49,8 @@ jobs: uses: peter-evans/create-pull-request@v6 with: token: ${{ env.ACTIONS_BOT_TOKEN }} - commit-message: auto-docs: Update @redpanda-data/docs-extensions-and-macros +- commit-message: auto-docs: Update @redpanda-data/docs-extensions-and-macros ++ commit-message: "auto-docs: Update @redpanda-data/docs-extensions-and-macros" labels: auto-docs title: auto-docs: Update @redpanda-data/docs-extensions-and-macros body: | From e566dc3e86bfc02cf662f2cb78ba32d1ff28a734 Mon Sep 17 00:00:00 2001 From: Jake Cahill <45230295+JakeSCahill@users.noreply.github.com> Date: Fri, 2 May 2025 10:16:17 +0100 Subject: [PATCH 4/4] Apply suggestions from code review --- .github/workflows/update-extensions.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/update-extensions.yml b/.github/workflows/update-extensions.yml index 6104c46ef..5a16bd79e 100644 --- a/.github/workflows/update-extensions.yml +++ b/.github/workflows/update-extensions.yml @@ -49,8 +49,7 @@ jobs: uses: peter-evans/create-pull-request@v6 with: token: ${{ env.ACTIONS_BOT_TOKEN }} -- commit-message: auto-docs: Update @redpanda-data/docs-extensions-and-macros -+ commit-message: "auto-docs: Update @redpanda-data/docs-extensions-and-macros" + commit-message: "auto-docs: Update @redpanda-data/docs-extensions-and-macros" labels: auto-docs title: auto-docs: Update @redpanda-data/docs-extensions-and-macros body: |