Skip to content

Commit 0403da7

Browse files
Validation
1 parent ad9ced1 commit 0403da7

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,26 @@ permissions:
1010
contents: read
1111

1212
jobs:
13-
sandbox:
13+
deploy:
1414
name: "Plan & Deploy Sandbox Environment"
1515
runs-on: ubuntu-latest
1616
environment: Sandbox
1717
steps:
1818
- name: Checkout
1919
uses: actions/checkout@main
2020

21-
- name: "Validate Repository Secrets"
21+
- name: "Validate GitHub Environment"
2222
run: |
23-
test -z "${{ vars.DEPLOY_ROLE_ARN }}" && echo "::error title=Repository Configuration Incomplete::This repository is missing a secret for DEPLOY_ROLE_ARN!"
24-
test -z "${{ vars.DEPLOY_ROLE_ARN2 }}" && echo "::error title=Repository Configuration Incomplete::This repository is missing a secret for DEPLOY_ROLE_ARN2!"
23+
raised=0
24+
test -z "${{ vars.DEPLOY_ROLE_ARN }}" && (echo "::error title=Repository Configuration Incomplete::This repository is missing an environment variable for DEPLOY_ROLE_ARN!"; raised=1)
25+
test -z "${{ vars.AWS_REGION }}" && (echo "::error title=Repository Configuration Incomplete::This repository is missing a secret for AWS_REGION!"; raised=1)
26+
exit $raised
2527
2628
- name: Configure AWS credentials
2729
uses: aws-actions/configure-aws-credentials@v1.7.0
2830
with:
2931
role-to-assume: ${{ vars.DEPLOY_ROLE_ARN }}
30-
role-session-name: ${{ github.repository }}|${{ github.event_name }}|${{github.ref}}
32+
role-session-name: ${{ github.repository }}
3133
aws-region: ${{ vars.AWS_REGION }}
3234

3335
- name: Plan

0 commit comments

Comments
 (0)