Skip to content

.github/workflows/default.yaml #34

.github/workflows/default.yaml

.github/workflows/default.yaml #34

Workflow file for this run

on: workflow_dispatch
permissions:
id-token: write
checks: write
jobs:
cdk-deploy-gradle-test:
environment: nonprod
runs-on: ubuntu-22.04
steps:
- 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: sts-get-caller-identity
run: aws sts get-caller-identity
- 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 | tee cdk-diff-security
continue-on-error: true
- 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: success() || failure()
- 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: success() || failure()
with:
report_paths: 'build/test-results/test/TEST-*.xml'