-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (61 loc) · 2.26 KB
/
default.yaml
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
on: workflow_dispatch
permissions:
id-token: write
checks: write
jobs:
cdk-deploy-gradle-test:
environment: nonprod
runs-on: ubuntu-22.04
steps:
- name: check-aws-account-id
uses: actions/[email protected]
with:
script: |
if ("${{ vars.AWS_ACCOUNT_ID }}" == "") {
core.setFailed("AWS_ACCOUNT_ID is unspecified")
} else {
core.info("AWS_ACCOUNT_ID is ${{ vars.AWS_ACCOUNT_ID }}")
}
- name: configure-aws-credentials
uses: aws-actions/[email protected]
with:
role-to-assume: "arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/GitHubActions"
role-session-name: GitHubActions-${{ github.run_id }}-${{ github.run_number }}
aws-region: eu-west-1
- name: npm-install-cdk
run: npm install -g [email protected]
- name: checkout
uses: actions/[email protected]
- name: setup-java
uses: actions/[email protected]
with:
distribution: 'corretto'
java-version: '17'
cache: 'gradle'
- name: cdk-permissions-broadening
id: cdk-permissions-broadening
run: cdk diff --security-only --fail Binsley > cdk-diff-security
continue-on-error: true
- name: cdk-diff-security
id: cdk-diff-security
uses: actions/[email protected]
if: steps.cdk-permissions-broadening.outcome == 'failure'
with:
name: cdk-diff-security
path: cdk-diff-security
- name: cdk-deploy
run: cdk deploy --require-approval never Binsley
if: steps.cdk-diff-security.outcome == 'success' || steps.cdk-diff-security.outcome == 'failure' || steps.cdk-diff-security.outcome == 'skipped'
- name: assume-test-runner-role
uses: aws-actions/[email protected]
with:
role-to-assume: BinsleyTestRunner
role-chaining: true
aws-region: eu-west-1
- name: gradle-test
run: ./gradlew test
- name: test-report
uses: mikepenz/[email protected]
if: steps.gradle-test.outcome == 'success' || steps.gradle-test.outcome == 'failure'
with:
report_paths: 'build/test-results/test/TEST-*.xml'