trigger-npm-update #22
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-extensions | |
on: | |
workflow_dispatch: | |
repository_dispatch: | |
types: [trigger-npm-update] | |
jobs: | |
update-dependency: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
strategy: | |
matrix: | |
branch: [main] | |
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 | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ matrix.branch }} | |
token: ${{ env.ACTIONS_BOT_TOKEN }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- run: npm install | |
- 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 }} | |
- 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 |