trigger-npm-update #7
This file contains 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
name: Update @redpanda-data/docs-extensions-and-macros | |
on: | |
workflow_dispatch: | |
repository_dispatch: | |
types: [trigger-npm-update] | |
jobs: | |
update-dependency: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
branch: [main] | |
steps: | |
- name: configure aws credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_SM_READONLY_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SM_READONLY_SECRET_ACCESS_KEY }} | |
aws-region: us-west-2 | |
- name: get secrets from aws sm | |
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 "[email protected]" | |
git add package.json package-lock.json | |
git commit -m "Update @redpanda-data/docs-extensions-and-macros" | |
env: | |
ACCESS_TOKEN: ${{ env.ACTIONS_BOT_TOKEN }} | |
- name: Create pull request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
commit-message: "auto-docs: update @redpanda-data/docs-extensions-and-macros" | |
token: ${{ env.ACTIONS_BOT_TOKEN }} | |
branch: update-branch-${{ matrix.branch }} | |
title: "auto-docs: Update extensions on ${{ matrix.branch }}" | |
body: "This PR updates the @redpanda-data/docs-extensions-and-macros package on the ${{ matrix.branch }} branch." | |
labels: auto-docs | |
reviewers: asimms41, JakeSCahill, Deflaimun |