Skip to content

Commit

Permalink
remove reference to secret in actions.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
varadarajan-tw committed Oct 18, 2024
1 parent aa4e627 commit e242eb3
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 3 deletions.
12 changes: 10 additions & 2 deletions .github/actions/build-with-cache/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
name: 'Build'
description: 'This action builds this project with remote s3 cache.'
inputs:
aws-region:
description: 'The AWS region to use for the cache.'
required: true
default: 'us-west-2'
cache-role-to-assume:
description: 'The ARN of the role to assume to access the cache.'
required: true
runs:
using: 'composite'
steps:
Expand All @@ -8,8 +16,8 @@ runs:
shell: bash
with:
audience: sts.amazonaws.com
aws-region: ${{ secrets.CACHE_AWS_REGION }}
role-to-assume: ${{ secrets.CACHE_ROLE_TO_ASSUME }}
aws-region: ${{ inputs.aws-region }}
role-to-assume: ${{ inputs.cache-role-to-assume }}

- name: Build (Affected)
shell: bash
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ jobs:

- name: Build
uses: ./.github/actions/build-with-cache
with:
aws-region: ${{ secrets.AWS_REGION }}
cache-role-to-assume: ${{ secrets.CACHE_ROLE_TO_ASSUME }}

- name: Test (Affected)
run: yarn nx affected -t test --parallel=3 --coverage # nx recipe
Expand Down Expand Up @@ -80,6 +83,9 @@ jobs:

- name: Build
uses: ./.github/actions/build-with-cache
with:
aws-region: ${{ secrets.AWS_REGION }}
cache-role-to-assume: ${{ secrets.CACHE_ROLE_TO_ASSUME }}

- name: Lint
env:
Expand Down Expand Up @@ -117,6 +123,9 @@ jobs:

- name: Build
uses: ./.github/actions/build-with-cache
with:
aws-region: ${{ secrets.AWS_REGION }}
cache-role-to-assume: ${{ secrets.CACHE_ROLE_TO_ASSUME }}

- name: Validate Definitions
run: yarn validate
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ext.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ jobs:

- name: Build
uses: ./.github/actions/build-with-cache
with:
aws-region: ${{ secrets.AWS_REGION }}
cache-role-to-assume: ${{ secrets.CACHE_ROLE_TO_ASSUME }}
3 changes: 3 additions & 0 deletions .github/workflows/publish-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:

- name: Build
uses: ./.github/actions/build-with-cache
with:
aws-region: ${{ secrets.AWS_REGION }}
cache-role-to-assume: ${{ secrets.CACHE_ROLE_TO_ASSUME }}

- name: Fetch Latest Tags
run: |
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ jobs:
run: yarn install --frozen-lockfile

- name: Build
run: NODE_ENV=production yarn build
uses: ./.github/actions/build-with-cache
with:
aws-region: ${{ secrets.AWS_REGION }}
cache-role-to-assume: ${{ secrets.CACHE_ROLE_TO_ASSUME }}

- name: Fetch Latest Tags
run: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/version-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ jobs:
- name: Build
uses: ./.github/actions/build-with-cache
with:
aws-region: ${{ secrets.AWS_REGION }}
cache-role-to-assume: ${{ secrets.CACHE_ROLE_TO_ASSUME }}

- name: Version Packages
run: yarn lerna version minor --yes --allow-branch ${{ github.event.inputs.branch }} --no-git-tag-version --no-commit-hooks --no-private
Expand Down

0 comments on commit e242eb3

Please sign in to comment.