Skip to content

Commit

Permalink
Updated DX_GITHUB_TOKEN for vault provider action
Browse files Browse the repository at this point in the history
  • Loading branch information
noahg1 committed Sep 25, 2023
1 parent 447df3c commit 7cc7304
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/listener.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,27 @@ 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
artifactory-access-token-type: readers
export-github-pat: true

- uses: actions/checkout@v2

- name: Build SDK and Open PR
uses: Bandwidth/[email protected]
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: |
Expand All @@ -34,17 +42,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 }},
Expand All @@ -57,7 +65,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 }},
Expand Down

0 comments on commit 7cc7304

Please sign in to comment.