diff --git a/.github/workflows/listener.yml b/.github/workflows/listener.yml index b920cd90..db9f2cb3 100644 --- a/.github/workflows/listener.yml +++ b/.github/workflows/listener.yml @@ -10,6 +10,13 @@ jobs: if: ${{ github.event.action == 'Build' }} runs-on: ubuntu-latest steps: + - name: Get GH Access Token + uses: Bandwidth/vault-provider-action@v1 + with: + identity-source: repo + durable-team-name: BAND SWI + export-github-pat: true + - uses: actions/checkout@v2 - name: Build SDK and Open PR @@ -17,12 +24,12 @@ jobs: with: branch-name: ${{ github.event.client_payload.branchName }} username: ${{ secrets.DX_GITHUB_USERNAME }} - token: ${{ secrets.DX_GITHUB_TOKEN }} + token: ${{ env.GITHUB_ACCESS_TOKEN }} openapi-generator-version: v5.4.0 language: python config: ./openapi-config.yml env: - GITHUB_TOKEN: ${{ secrets.DX_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ env.GITHUB_ACCESS_TOKEN }} - name: Open Pull Request run: | @@ -34,17 +41,17 @@ jobs: echo "PR already exists for this branch" fi env: - GITHUB_TOKEN: ${{ secrets.DX_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ env.GITHUB_ACCESS_TOKEN }} - name: Output PR Number id: output-pr-number run: echo "PR_NUMBER=$(hub pr list -h ${{ inputs.branch-name }} -f %I)" >> $GITHUB_ENV env: - GITHUB_TOKEN: ${{ secrets.DX_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ env.GITHUB_ACCESS_TOKEN }} - uses: actions/github-script@v6 with: - github-token: ${{secrets.DX_GITHUB_TOKEN}} + github-token: ${{env.GITHUB_ACCESS_TOKEN}} script: | github.rest.issues.createComment({ issue_number: ${{ github.event.client_payload.prNumber }}, @@ -57,7 +64,7 @@ jobs: uses: actions/github-script@v6 if: failure() with: - github-token: ${{secrets.DX_GITHUB_TOKEN}} + github-token: ${{env.GITHUB_ACCESS_TOKEN}} script: | github.rest.issues.createComment({ issue_number: ${{ github.event.client_payload.prNumber }},