Merge pull request #1150 from govuk-one-login/dependabot/gradle/main/… #113
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CIMIT Stub Build & Push | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- di-ipv-cimit-stub/** | |
- .github/workflows/cimit-stub.yml | |
jobs: | |
buildAndPush: | |
name: Build and push | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
env: | |
AWS_REGION: eu-west-2 | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
cache: gradle | |
- name: Set up AWS creds | |
uses: aws-actions/configure-aws-credentials@v4.0.2 | |
with: | |
role-to-assume: ${{ secrets.CIMIT_STUB_GH_ACTIONS_ROLE_ARN }} | |
aws-region: eu-west-2 | |
- name: Set up SAM cli | |
uses: aws-actions/setup-sam@v2 | |
- name: SAM Validate | |
working-directory: ./di-ipv-cimit-stub/deploy | |
run: sam validate --region ${{ env.AWS_REGION }} | |
- name: SAM build and test | |
working-directory: ./di-ipv-cimit-stub/deploy | |
run: sam build | |
- name: Deploy SAM app | |
uses: govuk-one-login/devplatform-upload-action@v3.9 | |
with: | |
artifact-bucket-name: ${{ secrets.CIMIT_STUB_ARTIFACT_BUCKET_NAME }} | |
signing-profile-name: ${{ secrets.SIGNING_PROFILE_NAME }} | |
working-directory: ./di-ipv-cimit-stub/deploy | |
template-file: .aws-sam/build/template.yaml |