fix: Add ACTIONS_BOT_TOKEN and VBOT_GITHUB_API_TOKEN to token check (… #157
This file contains hidden or 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: publish-to-npm | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main] | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| 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: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 24 | |
| registry-url: 'https://registry.npmjs.org/' | |
| - run: npm install | |
| - uses: JS-DevTools/npm-publish@v4 | |
| id: publish | |
| - name: Check published version | |
| if: ${{ steps.publish.outputs.type }} | |
| run: echo "Version changed!" | |
| dispatch: | |
| needs: publish | |
| strategy: | |
| matrix: | |
| repo: ['redpanda-data/docs', 'redpanda-data/cloud-docs', 'redpanda-data/rp-connect-docs', 'redpanda-data/api-docs'] | |
| runs-on: ubuntu-latest | |
| 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: peter-evans/repository-dispatch@v3 | |
| with: | |
| token: ${{ env.ACTIONS_BOT_TOKEN }} | |
| repository: ${{ matrix.repo }} | |
| event-type: trigger-npm-update | |
| client-payload: '{"commit_sha": "${{ github.sha }}"}' |