Skip to content

Commit 402f4ce

Browse files
authored
improv(ci): removed the secret inheritance and replaced with the needed secrets (#4364)
1 parent 1c063d6 commit 402f4ce

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

.github/workflows/make-release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ jobs:
9191
# publish_layer -> reusable_deploy_layer_stack -> reusable_update_layer_arn_docs
9292
publish_layer:
9393
needs: publish-npm
94-
secrets: inherit
94+
secrets:
95+
AWS_LAYERS_BETA_ROLE_ARN: ${{ secrets.AWS_LAYERS_BETA_ROLE_ARN }}
96+
AWS_LAYERS_PROD_ROLE_ARN: ${{ secrets.AWS_LAYERS_PROD_ROLE_ARN }}
97+
TOKEN_GITHUB: ${{ secrets.GITHUB_TOKEN }}
9598
permissions:
9699
id-token: write
97100
contents: write

.github/workflows/on_doc_merge.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ jobs:
1616
permissions:
1717
id-token: write # trade JWT token for AWS credentials in AWS Docs account
1818
contents: read # read from this repo to publish docs
19-
secrets: inherit
19+
secrets:
20+
AWS_DOCS_ROLE_ARN: ${{ secrets.AWS_DOCS_ROLE_ARN }}
21+
AWS_DOCS_BUCKET: ${{ secrets.AWS_DOCS_BUCKET }}
2022
uses: ./.github/workflows/reusable_publish_docs.yml
2123
with:
2224
version: main

.github/workflows/publish_layer.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ on:
1313
required: true
1414

1515
workflow_call:
16+
secrets:
17+
AWS_LAYERS_BETA_ROLE_ARN:
18+
description: "Role ARN for deploying the Layer to Beta"
19+
AWS_LAYERS_PROD_ROLE_ARN:
20+
description: "Role ARN for deploying the Layer to Prod"
21+
TOKEN_GITHUB:
22+
description: "GitHub Token to interact with GitHub"
1623
inputs:
1724
latest_published_version:
1825
type: string
@@ -117,4 +124,4 @@ jobs:
117124
with:
118125
temp_branch_prefix: 'ci-layer-docs'
119126
pull_request_title: 'chore(ci): update layer ARN on documentation'
120-
github_token: ${{ secrets.GITHUB_TOKEN }}
127+
github_token: ${{ secrets.TOKEN_GITHUB }}

.github/workflows/rebuild_latest_docs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ jobs:
3030
permissions:
3131
id-token: write # trade JWT token for AWS credentials in AWS Docs account
3232
contents: read # read from this repo to publish docs
33-
secrets: inherit
33+
secrets:
34+
AWS_DOCS_ROLE_ARN: ${{ secrets.AWS_DOCS_ROLE_ARN }}
35+
AWS_DOCS_BUCKET: ${{ secrets.AWS_DOCS_BUCKET }}
3436
uses: ./.github/workflows/reusable_publish_docs.yml
3537
with:
3638
version: ${{ inputs.latest_published_version }}

0 commit comments

Comments
 (0)