forked from aws-actions/aws-secretsmanager-get-secrets
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
32 lines (32 loc) · 1.07 KB
/
Copy pathaction.yml
File metadata and controls
32 lines (32 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Builds
description: Builds the repository and assumes the AWS IAM role for testing
inputs:
aws-region:
description: Region where the credentials will be assumed
required: false
default: us-east-1
runs:
using: composite
steps:
- name: Install dependencies
run: npm ci
shell: bash
- name: Build the dist folder
run: npm run build
shell: bash
- name: Determine role to assume
id: role-to-assume
run: |
if [ "${{ github.event_name }}" == "push" ]; then
# Use prod role for the PRs running against the main repo
echo "arn=arn:aws:iam::339713045997:role/GithubActionsRole" >> "$GITHUB_OUTPUT"
else
# Use beta role for the PRs running against engineer forks
echo "arn=arn:aws:iam::654654453185:role/GithubActionsRole" >> "$GITHUB_OUTPUT"
fi
shell: bash
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v5
with:
role-to-assume: ${{ steps.role-to-assume.outputs.arn }}
aws-region: ${{ inputs.aws-region }}