Skip to content

Commit 6ff56d4

Browse files
authored
Merge branch 'main' into minor-fixes
2 parents d2ea1bf + 7e2ab5a commit 6ff56d4

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

.github/workflows/cd.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,25 @@ jobs:
1414
runs-on: ubuntu-latest
1515
environment: production
1616
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+
1730
- name: Checkout the repo
1831
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 }}
1936

2037
- name: Setup node
2138
uses: actions/setup-node@v3
@@ -38,7 +55,7 @@ jobs:
3855
with:
3956
publish: npx changeset publish
4057
env:
41-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
GITHUB_TOKEN: ${{ steps.gati.outputs.access-token }}
4259
# Action needs NPM_TOKEN https://github.com/changesets/action#with-publishing
4360
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4461
# actions/setup-node creates an .npmrc file that references NODE_AUTH_TOKEN
@@ -57,7 +74,7 @@ jobs:
5774
- name: Publish dev snapshot
5875
if: steps.changesets.outputs.published != 'true'
5976
env:
60-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
GITHUB_TOKEN: ${{ steps.gati.outputs.access-token }}
6178
# actions/setup-node creates an .npmrc file that references NODE_AUTH_TOKEN
6279
# https://github.com/actions/setup-node/blob/5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d/docs/advanced-usage.md?plain=1#L346
6380
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)