From 7cc730477724eeff81d588a2d83557076f512487 Mon Sep 17 00:00:00 2001 From: Noah Hicks <77810108+noahg1@users.noreply.github.com> Date: Mon, 25 Sep 2023 11:29:07 -0400 Subject: [PATCH 1/2] Updated DX_GITHUB_TOKEN for vault provider action --- .github/workflows/listener.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/listener.yml b/.github/workflows/listener.yml index b920cd90..16559eca 100644 --- a/.github/workflows/listener.yml +++ b/.github/workflows/listener.yml @@ -10,6 +10,14 @@ 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 @@ -17,12 +25,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 +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 }}, @@ -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 }}, From 050e25118d9e9a85e80b43d6639b62f5ea38e50f Mon Sep 17 00:00:00 2001 From: Noah Hicks <77810108+noahg1@users.noreply.github.com> Date: Mon, 25 Sep 2023 16:15:33 -0400 Subject: [PATCH 2/2] remove artifactory readers --- .github/workflows/listener.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/listener.yml b/.github/workflows/listener.yml index 16559eca..db9f2cb3 100644 --- a/.github/workflows/listener.yml +++ b/.github/workflows/listener.yml @@ -15,7 +15,6 @@ jobs: with: identity-source: repo durable-team-name: BAND SWI - artifactory-access-token-type: readers export-github-pat: true - uses: actions/checkout@v2