This repository has been archived by the owner on Oct 18, 2023. It is now read-only.
GPC-643: Enforce TLS version 1.2 or higher (#2386) #1101
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: SAM - Main | |
permissions: | |
id-token: write | |
contents: read | |
checks: write | |
pull-requests: write | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "main" | |
jobs: | |
test: | |
uses: ./.github/workflows/test.yml | |
secrets: | |
SAM_APP_VALIDATE_ROLE_ARN: ${{ secrets.SAM_APP_VALIDATE_ROLE_ARN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
deploy: | |
name: Deploy SAM to build | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'corretto' | |
cache: gradle | |
- name: Cache Gradle packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: ${{ runner.os }}-gradle | |
- name: Set up SAM cli | |
uses: aws-actions/setup-sam@v2 | |
with: | |
use-installer: true | |
- name: Set up AWS creds | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.GH_ACTIONS_ROLE_ARN }} | |
role-session-name: deploy-sam | |
aws-region: eu-west-2 | |
- name: SAM validate | |
run: sam validate | |
- name: SAM build and test | |
run: sam build | |
- name: Deploy SAM app | |
uses: alphagov/di-devplatform-upload-action@v3.3 | |
with: | |
artifact-bucket-name: ${{ secrets.ARTIFACT_BUCKET_NAME }} | |
signing-profile-name: ${{ secrets.SIGNING_PROFILE_NAME }} | |
working-directory: .aws-sam/build |