|
14 | 14 | runs-on: ubuntu-latest
|
15 | 15 | environment: production
|
16 | 16 | steps:
|
| 17 | + - name: Assume role capable of getting token from gati |
| 18 | + uses: aws-actions/configure-aws-credentials@8c3f20df09ac63af7b3ae3d7c91f105f857d8497 # v4.0.0 |
| 19 | + with: |
| 20 | + role-to-assume: ${{ secrets.AWS_OIDC_FUNCTIONS_TOOLKIT_CI_CHANGESET_TOKEN_ISSUER_ROLE_ARN }} |
| 21 | + role-duration-seconds: '900' |
| 22 | + aws-region: ${{ secrets.AWS_REGION }} |
| 23 | + |
| 24 | + - name: Get github token from gati |
| 25 | + id: gati |
| 26 | + uses: smartcontractkit/chainlink-github-actions/github-app-token-issuer@main |
| 27 | + with: |
| 28 | + url: ${{ secrets.LAMBDA_FUNCTIONS_URL }} |
| 29 | + |
17 | 30 | - name: Checkout the repo
|
18 | 31 | uses: actions/checkout@v3
|
| 32 | + with: |
| 33 | + # This sets up the local git config so that the changesets action |
| 34 | + # can commit changes to the repo on behalf of the GitHub Actions bot. |
| 35 | + token: ${{ steps.gati.outputs.access-token }} |
19 | 36 |
|
20 | 37 | - name: Setup node
|
21 | 38 | uses: actions/setup-node@v3
|
|
38 | 55 | with:
|
39 | 56 | publish: npx changeset publish
|
40 | 57 | env:
|
41 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 58 | + GITHUB_TOKEN: ${{ steps.gati.outputs.access-token }} |
42 | 59 | # Action needs NPM_TOKEN https://github.com/changesets/action#with-publishing
|
43 | 60 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
44 | 61 | # actions/setup-node creates an .npmrc file that references NODE_AUTH_TOKEN
|
|
57 | 74 | - name: Publish dev snapshot
|
58 | 75 | if: steps.changesets.outputs.published != 'true'
|
59 | 76 | env:
|
60 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 77 | + GITHUB_TOKEN: ${{ steps.gati.outputs.access-token }} |
61 | 78 | # actions/setup-node creates an .npmrc file that references NODE_AUTH_TOKEN
|
62 | 79 | # https://github.com/actions/setup-node/blob/5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d/docs/advanced-usage.md?plain=1#L346
|
63 | 80 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
0 commit comments