Skip to content

Commit 448a4c4

Browse files
committed
Validate AWS OIDC role presence before deployment
1 parent 43f05af commit 448a4c4

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ jobs:
6464
- name: Install Post-CSS
6565
run: npm install postcss-cli
6666

67+
- name: Validate AWS OIDC role
68+
run: |
69+
if [ -z "$DEPLOY_ROLE_ARN" ] && [ -z "$AWS_OIDC_ROLE" ]; then
70+
printf '%s\n' "Either the deploy-role-arn input or AWS_OIDC_ROLE secret must be provided." >&2
71+
exit 1
72+
fi
73+
env:
74+
DEPLOY_ROLE_ARN: ${{ inputs.deploy-role-arn }}
75+
AWS_OIDC_ROLE: ${{ secrets.AWS_OIDC_ROLE }}
76+
6777
- name: AWS Github OIDC Login
6878
uses: aws-actions/configure-aws-credentials@v6
6979
with:

0 commit comments

Comments
 (0)